2010年5月23日 星期日

iMon VFD on Arch Linux

1. you have to install lirc which provides kernel module ( driver ) support for soundgraph imon devices

pacman -S lirc

2. use the command, modinfo, to find out all parameters of a module

modinfo lirc_imon
--

filename: /lib/modules/2.6.33-ARCH/kernel/drivers/misc/lirc_imon.ko
..
..
parm: debug:Debug messages: 0=no, 1=yes(default: no) (int)
parm: display_type:Type of attached display. 0=autodetect, 1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect) (int)
..
..

3. create a module setting for imon vfd

vi /etc/modprobe.d/lirc_imon.conf
--

options lirc_imon display_type=1

4. enable lirc_imon module

modprobe lirc_imon

after that, my linux created two device files, /dev/lirc0 /dev/lcd2

5. copy correct remote setting to /etc/lircd.conf, my model is imon pad

cp /usr/share/lirc/remotes/imon/lircd.conf.imon-pad /etc/lircd.conf


6. start lirc daemon

/etc/rc.d/lircd start


7. install LCDproc in AUR

yaourt lcdproc

8. edit server configuration file, /etc/LCDd.conf

vi /etc/LCDd.conf
--

..
..
Driver=imon
..
..
[imon]

# select the device to use
Device=/dev/lcd2

# display dimensions
Size=16x2
..
..

9. start lcdproc server daemon

/etc/rc.d/lcdd start

10. edit client configuration file, /etc/lcdproc.conf

vi /etc/LCDd.conf
--
# address of the LCDd server to connect to
Server=localhost

# Port of the server to connect to
Port=13666

# set reporting level
ReportLevel=7

# report to to syslog ?
ReportToSyslog=false

# run in foreground [default: false; legal: true, false]
#Foreground=true

# PidFile location when running as daemon [default: /var/run/lcdproc.pid]
#PidFile=/var/run/lcdproc.pid

# slow down initial announcement of modes (in 1/100s)
#delay=2

# display name for the main menu [default: LCDproc HOST]
#DisplayName=lcdproc


## screen specific configuration options ##

[CPU]
# Show screen
Active=True
OnTime=1
OffTime=2
ShowInvisible=false


[Iface]
# Show screen
Active=True

# Show stats for Interface0
Interface0=eth0
# Interface alias name to display [default: ]
Alias0=LAN

# Show stats for Interface1
#Interface1=eth1
#Alias1=WAN

# Show stats for Interface2
#Interface2=eth2
#Alias2=MGMT

# for more than 3 interfaces change MAX_INTERFACES in iface.h and rebuild

# Units to display [default: byte; legal: byte, bit, packet]
unit=bit

# add screen with transferred traffic
#transfer=TRUE


[Memory]
# Show screen
Active=True


[Load]
# Show screen
Active=True
# Min Load Avg at which the backlight will be turned off [default: 0.05]
LowLoad=0.05
# Max Load Avg at which the backlight will start blinking [default: 1.3]
HighLoad=1.3


[TimeDate]
# Show screen
Active=True
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"


[About]
# Show screen
Active=false


[SMP-CPU]
# Show screen
Active=false


[OldTime]
# Show screen
Active=false
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"


[BigClock]
# Show screen
Active=false


[Uptime]
# Show screen
Active=false


[Battery]
# Show screen
Active=false


[CPUGraph]
# Show screen
Active=false


[ProcSize]
# Show screen
Active=false


[Disk]
# Show screen
Active=false


[MiniClock]
# Show screen
Active=false
# time format [default: %H:%M; legal: see strftime(3)]
TimeFormat="%H:%M"


# EOF

11. run lcdproc as root because of the permission of default PidFile location

sudo lcdproc

12. various clients were made for different displays dimensions so the only way is modify the source code if you want to make a client fit for your lcd

2010年5月4日 星期二

Mouse and Keyboard Sharing between Linux and Windows

synergy lets you share a single mouse and keyboard between multiple computers with different operating systems via network so one of them must be server, others would be clients
synergy+ is a maintenance fork for implementing bug fixes to the original synergy which hasn't any source updates since 2006

1. install synergy-plus on my server side, arch linux

yaourt synergy-plus

2. edit the configuration file on the server side

vi /etc/synergy.conf
--

# declare name of screens
section: screens
server:
client:
end

# specify relative positions
section: links
server:
right = client
client:
left = server
end

section: aliases
end

section: options
relativeMouseMoves = true
end

# windows is my client which be located right to linux.
# in other words, linux is left to windows.
# if set relativeMouseMoves to true then secondary screens move the mouse using relative moves only when the cursor is locked to the screen (by Scroll Lock or a configured hot key). this option makes synergy work better with certain games.

3. autorun synergy server when log in

vi ~/.config/autostart/synergys.desktop
--

[Desktop Entry]
Type=Application
Exec=/usr/bin/synergys


4. download and install synergy+ on the client side, windows

http://synergy-plus.googlecode.com/files/synergy-plus-1.3.4-Windows-x86-r1.exe

5. if the client synergy is on windows vista or 7, you may face UAC conflicts with it. first is unable to use synergy to login windows. second is synergy stop working when a uac prompt appears.
the solution is run synergy+ as administrator and configure it autostart when computer starts and install The Vista Syn to load synergy as a service