Skip to content

Instantly share code, notes, and snippets.

@detly
Created April 20, 2015 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detly/bdb61b894b8748ae9738 to your computer and use it in GitHub Desktop.
Save detly/bdb61b894b8748ae9738 to your computer and use it in GitHub Desktop.
# 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