Created
April 20, 2015 23:21
-
-
Save detly/bdb61b894b8748ae9738 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Synergy Client | |
# | |
# Starts the synergy client when an X session is up and running. | |
# This should be placed in /etc/init/synergys.conf and there must | |
# be a configuration file in /etc/synergy/synergys.conf. | |
description "Synergy Server" | |
author "Jason Heeris <jason.heeris@gmail.com>" | |
start on ((login-session-start | |
or started gdm | |
or started kdm | |
or started xdm | |
or started lxdm | |
or started lightdm | |
or drm-device-added | |
or drm-device-changed | |
or drm-device-removed | |
or graphics-device-added | |
or graphics-device-changed | |
or graphics-device-removed | |
or bdi-device-added | |
or bdi-device-changed | |
or bdi-device-removed)) | |
stop on (drm-device-added | |
or drm-device-changed | |
or drm-device-removed | |
or graphics-device-added | |
or graphics-device-changed | |
or graphics-device-removed | |
or bdi-device-added | |
or bdi-device-changed | |
or bdi-device-removed) | |
script | |
SYNERGY_CONF_FILE="/etc/synergy/synergys.conf" | |
# if [ -e "${SYNERGY_XVARS_FILE}" -a -e "${SYNERGY_CONF_FILE}" ]; then | |
if [ -e "${SYNERGY_CONF_FILE}" ]; then | |
# Hack | |
export XAUTHORITY="/var/run/lightdm/root/:0" | |
if [ -n "${XAUTHORITY}" ]; then | |
exec synergys -f -c "${SYNERGY_CONF_FILE}" | |
fi | |
fi | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment