July 19th, 2006

After 4 hours of working on it, I finally got my Ubuntu linux to load Hamachi on bootup, auto log me in, and then connect to my Synergy network. For my own benefit, I am going to document how I accomplished this:

   briancbecker@bcb-hpdino:~$ sudo nano /etc/gdm/gdm.conf-custom 

and then add the following under the daemon section:

   [daemon]   AutomaticLoginEnable=true   AutomaticLogin=briancbecker   TimedLoginEnable=true   TimedLogin=briancbecker   TimedLoginDelay=1 

Where briancbecker is the user you want to auto login. As for Hamachi, I’m assuming you got it installed, setup, connected to the network, etc. To start hamachi on bootup, you will have needed to edit your sudoer’s file like:

    briancbecker@bcb-hpdino:~$ export EDITOR=nano && sudo visudo 

and add the following line at the end of the file

   briancbecker ALL=NOPASSWD:/sbin/tuncfg 

(replacing briancbecker with your name again)

Now you can execute tuncfg (part of the Hamachi package) without having to enter your sudo password. I also assume you’ve gotten synergy set up as well. To make all this stuff start at log in, add these lines:

   # Start Hamachi and then Synergy   sudo /sbin/tuncfg   /usr/bin/hamachi stop   /usr/bin/hamachi start   /usr/bin/hamachi go-online BCBAPT   /usr/bin/synergyc 5.24.207.192 

BCBAPT is the Hamachi network you want to join on bootup and the 5.24.207.192 is the Hamachi IP (or static IP if you prefer) of the synergy server. These lines go in:

   briancbecker@bcb-hpdino:~$ sudo nano /etc/gdm/Init/Default 

before the line:

   sysmodmap=/etc/X11/Xmodmap 

and

   briancbecker@bcb-hpdino:~$ sudo nano /etc/gdm/PreSession/Default 

before the line:

   XSETROOT=`gdmwhich xsetroot` 

And there you have it. Hamachi should start up, GDM should auto log you into your Linux box, and then synergy should connect to your Hamachi server. Works for me under Xubuntu 6.06 running IceWM.

Posted in: old Filed under: