A quick writeup for a working setup (Linux is Server, Mac is Client)
synergy.conf:
section: screens
linux:
mac:
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
import time | |
import subprocess | |
GPIO.setmode(GPIO.BOARD) | |
# we will use the pin numbering to match the pins on the Pi, instead of the | |
# GPIO pin outs (makes it easier to keep track of things) | |
# use the same pin that is used for the reset button (one button to rule them all!) |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: pi_shutdown | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Shutdown on GPIO trigger | |
# Description: Python script listens for GPIO and runs shutdown command | |
### END INIT INFO |