Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Crunchbang Linux with Openbox and I would like to have Synergy ( autostart at the login screen.

I tried following: however I'm a bit new to Linux and I'm not quite sure how I should go about doing that.

Any ideas?


I want it to be the client.

I can get it to work after I manually login with the keyboard and mouse that are connected to it and then adding Synergy to the

What I want is Synergy to start before logging in, so I don't have to have a keyboard and mouse connected to the computer to login to it

share|improve this question
where exactly do you get stuck? Do you want this system to be the client or the server? – Journeyman Geek Nov 30 '11 at 4:38
ah sorry I want it to be the client – Mike Hagstrom Nov 30 '11 at 4:55
up vote 1 down vote accepted

Openbox uses a file at ~/.config/openbox/ to start files. You can add or remove things from this file.

In #!, you'll probably want to comment out the line that has cb-fortune in it, to remove the annoying "Statler Says" messages.

Since you're using #!, there's an easy way to get to this config. Hit SUPER + SPACE, and go to SETTINGS > OPENBOX CONFIG > EDIT AUTOSTART.SH

At the bottom, add a line that says synergyc server-host-name &, replacing server-host-name with... well... the server host name, save it, and restart with SETTINGS > OPENBOX CONFIG > RESTART

share|improve this answer
I got that to work however, I still have to login with the keyboard and mouse connected to the Crunchbang computer instead of the one from my Windows 7 Synergy server computer. – Mike Hagstrom Nov 30 '11 at 4:57
I've never used synergy, I can't be more help past setting things up to autostart. I'll look into it, though, it's something I've wanted to install. – Rob Nov 30 '11 at 4:58
Have you read through man synergyc and set up a config file? – Rob Nov 30 '11 at 5:01
Oh, I get your problem, since you aren't logged in, it isn't started. You'll want to have it run when the system boots, not when you log in. Hold on a minute, let me try a few things. – Rob Nov 30 '11 at 5:04

You can add it to /etc/rc.local

sudo nano /etc/rc.local

I made it look something like this:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits. 
# By default this script does nothing.

## Synergy Test thingy
echo "Starting Synergy Client"
synergyc lolhosttest

exit 0

If you switch to TTY1 (ctrl + alt + f1) you'll see it say "Starting Synergy Client" as the very last thing before prompting a log-in. If you do log in through the tty, and do top or htop, you'll see it's running. Since openbox wasn't started, obviously has nothing to do with it.

share|improve this answer
Sadly this did not work I have also tried: (sleep 10; DISPLAY=:0 synergyc and that does not work as well, it simply isn't starting at the login screen, I'm thinking it may have something to do with SLiM ( – Mike Hagstrom Nov 30 '11 at 6:45
Putting it in rc.local should start it as the kernel loads. :/ Join the IRC channel and ask in there, or check out the #! forums. Just load up xchat and it'll put you in the #! irc, and the forums are at still. – Rob Nov 30 '11 at 13:17

The only way I've found to do this is to vi /etc/slim.conf, set the default user and enable auto login:

default_user    yomomma


auto_login    yes

Then vi .config/openbox/autostart and add your synergy command. (Protip: for recent versions of synergy, you can just add synergy & to the autostart file, and it will open the GUI, connect, and (if you check the Edit > Settings > Hide on Startup box) iconize on success!)

This isn't the best, and you should be able to write a script that is started by rc.local and waits until there is an X server/WM/whatever to connect to (maybe just something like while ! synergyc --no-restart --enable-crypto theserverip; do sleep 1; done?), but this works in a pinch.

share|improve this answer

Your Answer


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.