views:

956

answers:

4

I have a Red Had Enterprise Linux 5 and a CentOS 5 box, both of which I am trying to configure to automatically connect to a synergy server on startup. I have followed the guide at http://synergy2.sourceforge.net/autostart.html and configured them the same way I configured previous Ubuntu 7.10 boxes, and this only seems to get me half way there. Currently, synergy connects at the login screen, but once I login, it doesn't come back up.

I added the following lines to /etc/gdm/{Init,PostLogin,PreSession}/Default :

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc fried-chicken # Init,PreSession only

All files are owned by root:root with 755 permissions, I'm just not sure what I'm missing here.

A: 

Try adding something like wall 'test' to the script and see if that shows up on the console. if so, you know the script's being called but it's a problem with synergy. If not, the script isn't being called at all.

Josh
A: 

Try the Synergy+ AutoStart wiki page.

nbolton
The simple method works, using System > Preferences > More Preferences > Sessions. In a slightly different spot, but with the same (and desired) effect.
Matt
Note: To have synergy work during the login screen, the three lines from the OP need to be added to the /etc/gdm/Init/Default file.
Matt
A: 

Just want to add: when following Matt's advice about putting a call to /usr/bin/synergyc in /etc/gdm/Init/Default, ensure you don't use the -f option there or the script will never exit and you won't be able to log in.

Dominic Jodoin
A: 

I use the following on RHEL 5.4 added to /etc/gdm/{Init,PostLogin,PreSession}/Default

/usr/bin/killall synergyc
while [ $(pgrep -x synergyc) ]; do sleep 0.1; done
/usr/bin/synergyc fully.qualified.hostname

In all cases, add the script after any existing script, but before the "exit 0". This works for me. I think it should work as long as you use the Default X Session, if any custom Sessions are used, you will probably have to move the script to the appropriate place.

cuberoot