I'm using Crunchbang Linux with Openbox and I would like to have Synergy (http://synergy-foss.org/) autostart at the login screen.

I tried following: https://wiki.archlinux.org/index.php/Synergy 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 autostart.sh

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

  • 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

Openbox uses a file at ~/.config/openbox/autostart.sh 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

  • 1
    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 autostart.sh has nothing to do with it.

  • 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 (slim.berlios.de) – 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 crunchbanglinux.org 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.


I didn't find a full solution, so made this, parted from synergy home. Ubuntu 19.10 with Lubuntu desktop. As a result synergy client starts automatically after reboot and works on login screen.


Description=Synergy Service

ExecStartPre=/bin/bash -c "sleep 10; /bin/systemctl set-environment SDDMXAUTH=$(/usr/bin/find /var/run/lightdm/ -type f)"
ExecStart=/bin/bash -c "XAUTHORITY=${SDDMXAUTH} /usr/bin/synergyc -f --restart --name YOURCLIENTNAME --enable-crypto SRVPCNAME:24800"


You need to change your display manager in /var/run/...

  1. systemctl daemon-reload systemctl enable synergy

  2. Also, I had an issue with fingerprint, so I copied from my user /home/user/.synergy/SSL/Fingerprints/TrustedServers.txt to root's user home.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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