Thursday, May 26, 2011

How to start automaticaly the Synergy Client using Ubuntu 11.04 Desktop connecting to a Sysnergy Server



Note: This instruction is for GDM

Step 1: Edit the file Default

sudo nano /etc/gdm/Init/Default

Step 2: Add the following lines to Default before the "sysmodmap=etc/X11/Xmodmap"

MYSYNCLIENT='gdmwhich synergyc'
if [ x$MYSYNCLIENT != x ] ; then
        $MYSYNCLIENT
fi

example:
MYSYNCLIENT='gdmwhich synergyc'
if [ x$MYSYNCLIENT != x ] ; then
        $MYSYNCLIENT 192.168.1.200
fi


Step 3: Press CTRL + X to save the file then press [Y]

Where not done yet. The instruction above is only for the session before login. Next instruction is for after login. The problem above is when the user successfully login, the session of the sysnergy will lost so we will need to start the synergy client again after login. Just follow the steps

Step 1: Edit the PreSession Default file.

sudo nano /etc/gdm/PreSession/Default

Step 2: Add the following code before the "XSETROOT='gdmwhich xsetroot'" line.

MYSYNCLIENT='gdmwhich synergyc'
if [ x$MYSYNCLIENT != x ] ; then
        $MYSYNCLIENT 
fi
 
example:
MYSYNCLIENT='gdmwhich synergyc'
if [ x$MYSYNCLIENT != x ] ; then
        $MYSYNCLIENT 192.168.1.200
fi
  

Step 3: Reboot your Ubuntu Machine i.e. sudo reboot