Thursday, April 24, 2008

One mouse and keyboard to rule them all

If you have several boxes sitting at your desk and do not want to use one keyboard and mouse for each of them, you could install and setup Synergy software. It's a freeware and works great ! it's a client server architecture that communicates through IP. A daemon (synergys note the s for server) runs on the machine that has the keyboard and mouse and listen for clients. The client (synergyc note the c for client) connects to it.

The configuration is VERY easy. Take a look at my config file :




















Section:screens

Laptop:

Desktop:
End

Section:links

Laptop:


right = Desktop

Desktop:


left = Laptop
End

Section:aliases

Laptop:


laptoprealname

Desktop:


desktoprealname
End

Section:options

switchDelay=1
End




Now, few explanations about that config file. In the screen section, you list all your systems and call them by a convenient name. I used laptop and desktop but you can use whatever suits your environment.
The links section describes how your screen are physically setup.
The aliases section is here to translate the convenient machine names you choose to real name or ip. In my case the file /etc/hosts contains entries for laptoprealname and desktoprealhostname.
The switchDelay in the last section set the number of ms to wait when the mouse reaches a screen edge before it crosses over next screen. I put 1 there meaning there will be almost no wait.

Now, how do you start all these.... For the server, you run synergys -f. It should read the config file in $HOME/.synergy.conf.
Then, on the client, you run synergyc -f -1 .

You should now be able to use only one mouse and keyboard to control your machines.

Thursday, April 10, 2008

Dual head with xrandr

This was posted by

I've got Ubuntu 7.10(gutsy) running pretty well on my DELL Latitude D505 laptop. I'll try to explain how I configured extended desktop with a NEC 19'' LCD monitor.
We will use xrandr utility to configure multiple screens. Before using xrandr you must check xorg.conf file ( /etc/X11/xorg.conf )


Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation 82852/855GM Integrated Graphics Device"
Monitor "Generic Monitor"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 2304 1792
Modes "1280x1024@75" "1024x768@60"
EndSubSection
EndSection

The Virtual keyword is important. Sum of resolution widths and sum of resolution heights of two monitors are written in Virtual.
For example : 1280 + 1024 = 2304 and 1024 + 768 = 1792


You must restart X server after updating xorg.conf file. ctrl-alt-backspace is the shortcut to restart X. After successfully restarting X server, run the following commands:

xrandr --output VGA --mode 1280x1024
xrandr --output LVDS --mode 1024x768
xrandr --output VGA --right-of LVDS
First command sets VGA (19'' LCD monitor) resolution to 1280x1024. Second command sets laptop monitor resolution to 1024x768. The last command places the extended monitor (VGA) right of laptop monitor. That's it. At least it works for me.

Friday, April 4, 2008

Enabling compiz for X3100 graphic card

If you install Ubuntu on a PC with a X3100 (aka 965), the right driver will be in place. So don't do as I did ;-) trying to upgrade the driver or editing the xorg.conf to see what it going on...
The reason why it is not working out of the box is because it is meant that way. Developers have black listed the x3100 due to some limitation to the with the current intel driver. So if you want compiz, you have to take the X3100 out of the black list. To do so, edit the file /usr/bin/compiz and comment out (add a # sign at the beginning) the following line :

T=”$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12″ # intel 965

So, in the end it should look like this:

#T=”$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12″ # intel 965

Then you can go to system->preferences->appearance and click on the "Visual Effect" tab to enable compiz. It worked like a charm for me (Toshiba A200 FT-1).

Thanks to this post : http://temporaryland.wordpress.com/2007/12/06/finding-the-right-distro-for-my-thinkpad-followup/