Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

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.

share|improve this answer
1  
(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...) –  fluteflute Nov 28 '10 at 12:44
1  
aha.. thanks fluteflute.. There's always something to lean :) –  Peter.O Nov 28 '10 at 13:19
    
Thanks guys!!!! –  David Oneill Nov 28 '10 at 14:53
    
It 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. –  David Planella Jan 31 '13 at 9:42
    
Doesn't work for me –  SwimBikeRun Oct 30 '13 at 21:15
show 2 more comments

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
share|improve this answer
add comment

I tried Kevin's answer, and while it seemed to work at first but I then started getting some really wacky behavior. I tried using session-setup-script to kill root's synergy and start it as the user in ~/.xprofile, but the wackiness continued. Finally gave up, removed the entries from lightdm.conf and kept the starting as a user in ~/.xprofile after logging in directly. Not perfect, but at least the weird behavior stopped.

share|improve this answer
add comment

I have successfully got this to work using Kevins method above. My Ubuntu machine (12.04) is configured as the client and my Windows machine (Win7) is the server.

run

sudo vi /etc/lightdm/lightdm.conf

add

greeter-setup-script=/usr/bin/synergyc <ip>

Save and reboot.

I had to specify the IP, it wouldnt work with hostname (the Ubuntu client is not on the windows domain) even though I can communicate with the windows machine via hostname once I had have logged into the Ubuntu machine)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.