Automatically starting synergy in GDM in Ubuntu/Fedora
At work, I have a Mac Mini as my main workstation with one monitor. There’s another monitor to the right which is connected to my Linux box. I run a synergy server on the Mac, and I run a synergy client in Linux. However, I was getting pretty frustrated when I’d have to manually start the synergy client on the Linux box with another keyboard.
After a bit of Google searching, I found a solution that will enable synergy at the GDM login as well as after the login (when the window manager starts). Here’s the process:
Open /etc/gdm/Init/Default in your editor of choice and go to the bottom of the file. Just before exit 0, add the following:
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc 111.222.333.444
Next, you can create the /etc/gdm/PostLogin/Default file as an empty file, or you can copy over the template file from /etc/gdm/PostLogin/Default.sample to /etc/gdm/PostLogin/Default. Either way, add the following to that file:
/usr/bin/killall synergyc
sleep 1
Finally, edit the /etc/gdm/Presession/Default file and add in the following before exit 0:
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc 111.222.333.444
Once that’s done, you can log out and log back in to see the changes. You can also reboot your Linux desktop or switch to runlevel 3 and back to 5 (if your OS supports runlevel changes).
To add a little more convenience if your IP is not static, you can add the IP to the hosts file of course and just use the hostname in the Default files.
Now if you can get the screensaver and the key mapping to work like it’s supposed to, let me know!
Yeah, I’m having frustrations synchronizing screen savers in Ubuntu 8.04 and CentOS 5. It works just fine in Fedora 8.
Funny - I have had all this running on the mini for some time : )
The only weirdness I’ve seen with Synergy and Fedora + OSX is:
1) syncrhonizing screensavers (Fedora will still have a display, but you can’t type anything or move the mouse) while OSX has a locked screen
2) periodically, Fedora will “forget” all about Synergyc and your control goes back to the mini. You must wait seconds for the connection to reestablish before working in that screen again. This is particularly fun when you have someone on the phone!