Start synergy on boot?
Solution 1
Option 1: start synergy before login
The main article is on Synergy's sourceforge site: Starting synergy automatically
Here is a lead-in to the article... there is too much detail to put it all here:
Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. It's best to have the display manager start synergy. You'll need the necessary (probably root) permission to modify the display manager configuration files. If you don't have that permission you can start synergy after logging in via the
.xsession
file.
Option 2: start synergy after login
To start Synergy once you have logged into your X-session.
Main Menu - System - Preferences - Startup Applications
[ Add ]
Name: synergys
Command: synergys --config ~/.synergy.conf
Comment: synergys
If you have problems with the ~/
, try $HOME/
or as a last resort use /home/your_username/
I just checked my notes... When I connected from Windows to a Linux box , my command was:
/usr/bin/synergyc 192.168.1.16
... maybe the full path is needed.
You are running Synergy as a server, I was running it as a client.. but that shouldn't effect the auto startup.
Solution 2
For newer version of Ubuntu that use lightdm.
I have successfully done the following for running the synergy client for the login screen, and after I login. It is much simpler than the other answers, IMHO.
edit /etc/lightdm/lightdm.conf as root.
sudo vi /etc/lightdm/lightdm.conf
add the following line to the bottom of the file.
greeter-setup-script=/usr/bin/synergyc <ip/host>
restart lightdm. (it is better to do this from a terminal or ssh session)
sudo /etc/init.d/lightdm restart
Solution 3
For Ubuntu 14.04 (and possibly others, I think 14.04 is the first build that lightdm was changed to this format, but this will work on any build that uses this setup) its simple you just need to edit 50-ubuntu.conf to get Synergy prior to lightdm:
sudo nano /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
For Client add this line:
greeter-setup-script=/usr/bin/synergyc <OPTIONS> <SERVER HOSTNAME>
For Server add this line:
greeter-setup-script=/usr/bin/synergys -c <CONFIG FILE>
Save files after edit and reboot (I know you can restart service rather than reboot but I perfer to reboot).
For Server or Client just insert the command that you would enter in terminal to get it to launch with the appropriate options ect...
So say I normally execute the command below in terminal on my client machine to run Synergy.
synergyc -n XBMC 192.168.1.99
All I need to do to run Synergy pre lightdm is add the line below to 50-ubuntu.conf
greeter-setup-script=/usr/bin/synergyc -n XBMC 192.168.1.99
Hope this helps, because the Synergy docs are a bit out of date. Enjoy!
Related videos on Youtube
vishal
Updated on September 17, 2022Comments
-
vishal almost 2 years
I use synergy. I would like to synergy to start as soon as I turn on my computer. How do I do that?
To start
synergy
, the command is:synergys --config ~/.synergy.conf
-
Code.Decode over 13 years(Note: this will cause Synergy to be run when you log in, rather than when the computer turns on. It may make no difference to you, but there is a difference...)
-
Peter.O over 13 yearsaha.. thanks fluteflute.. There's always something to lean :)
-
David Planella over 11 yearsIt seems this answer is out of date. GDM has been replaced by Lightdm and the Startup applications app is no longer in Ubuntu. It might be worth updating the answer or choosing the one below as the correct answer.
-
SwimBikeRun over 10 yearsDoesn't work for me
-
Mohammad_Hosseini over 10 yearsI have done everything has been said in synergy page but I'm getting this error when I run this command : /Library/StartupItems/Synergy/Synergy start
-
Mohammad_Hosseini over 10 yearsit gives me this error : /bin/sh: 0: Can't open . /etc/rc.common run=(/usr/bin/synergyc -n $(hostname -s) -1 -f 192.168.1.2) KeepAlive () { proc=${1##*/} while [
-
Justech over 3 yearsThe link you provided here doesn't work any more.