View Full Version : Anyone used Synergy on OS X? It's sort of working..
Has anyone used Synergy on OS X?
I want it so that I can easily control my server box which has the keyboard stacked out of the way behind the monitor. I was using Synergy with Vista but am having some issues getting it working on OS X.
With the -f switch on the command line, it works perfectly...
./synergys -f --config synergy.conf
I can see it running with a ps -eaf, no problems and the two systems work.
But as soon as I try it without the -f, I get returned to the prompt but when I check, it's not running. According to the documentation the -f forces it to run in foreground and removing it should allow it to run in the background.
Any ideas?
I use it - fantastic program. I use it the other way around though so that I can control the Mini from my Vista PC.
Why not create a script that runs the command line stuff that works (ie, with the -f) and then add a Login Item (System Preferences/Accounts/Feek/Login Items) to run the script?
I see what you mean, but won't that effectively open a terminal window when I login that runs the script?
And apologies for my dumbness here, I just create a .sh file with the above command line and just add that to the Login Items?
Yeah, I suppose it would open a terminal window - not ideal. If you went down that route, the file you create could have any extension you like, normally I leave them without an extension. You'd then need to make it executable by doing 'chmod 755 scriptname' and then run it with ./scriptname or /path/to/scriptname.
Another option is to use screen which is a very very useful UNIX command. I don't think it comes as standard with OS X, but it's definately available as I have it on my Macbook. To use it, open a terminal and type screen <enter> and you'll end up with a bash prompt. What you have now is bash running within screen running within bash. Start synergy using the -f switch and you can then background the bash process, close the terminal and leave synergy running.
To do that you need to press CTRL+a (seemingly nothing will happen) then press d and the process will be detached. You can then close the terminal window and synergy will still be running in the background.
If you want to reattached to the detached session, open a terminal and do 'screen -r' or 'screen -list' to get a list of the detached sessions then 'screen -r PID' to reattach to a specific one.
I'm sure there is a more elegant solution, but that will work until you find one.
I don't have the software but is there any reason you can't use -f and then stick an & on the end to background the task anyway? If that works then sticking 'nohup' on the front of the command will allow you to close the shell afterwards - i.e.
nohup ./synergys -f --config synergy.conf &
I'm not sure how login items work, so it's worth a try anyway. If it does leave a shell open and the nohup option works, then combine the two.
I'd tried it using & but not doing that taking away the -f and I'd not tried with nohup either.
Your line works perfectly, Mark :D - Now I need to persuade that to go into the Login Items
Almost there, I've got it autostarting but I get a terminal window pop up which I can close and it carries on running and that's with the 'hide' box ticked in Login Items.
Aye, terminal ignores the hide box. You could knock up a script and schedule it with cron that checks to see if synergy is running then exits if it is and starts it if it isn't.
I spent ages trying to get terminal stuff to behave like I wanted at login (I wrote a script that scans my Vista bootcamp partition and deletes the .DS_Store & other OS X crap) but gave up in the end and used cron instead to run it on a schedule.
How does synergy react if you try to start two instances? I would suspect that the second instance would moan that it can't bind to the port and then exit. In which case you could be lazy and just schedule a cron job to run it and ignore the checking that I mentioned.
Again, there is bound to be a more elegant solution but my geekery skills are depleated today.
vBulletin® v3.7.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.