diff --git a/Environment/synergy/InstallSynergy.sh b/Environment/synergy/InstallSynergy.sh new file mode 100755 index 0000000..9a9b284 --- /dev/null +++ b/Environment/synergy/InstallSynergy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo apt-get install synergy +sudo apt-get install ddccontrol +sudo cp lightdm.conf /etc/lightdm/lightdm.conf +sudo mkdir -p /etc/synergy +sudo cp MoniterSwitcher.sh /etc/synergy +sudo cp StartMoniter.sh /etc/synergy diff --git a/Environment/synergy/InstallSynergy.sh b/Environment/synergy/InstallSynergy.sh new file mode 100755 index 0000000..9a9b284 --- /dev/null +++ b/Environment/synergy/InstallSynergy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo apt-get install synergy +sudo apt-get install ddccontrol +sudo cp lightdm.conf /etc/lightdm/lightdm.conf +sudo mkdir -p /etc/synergy +sudo cp MoniterSwitcher.sh /etc/synergy +sudo cp StartMoniter.sh /etc/synergy diff --git a/Environment/synergy/MonitorSwitcher.sh b/Environment/synergy/MonitorSwitcher.sh new file mode 100755 index 0000000..4e2174c --- /dev/null +++ b/Environment/synergy/MonitorSwitcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Switch Display input on screen change (DELL 24" monitor specific) +# by John Ryland +# Copyright 2018 +# + +# This can be made to be run by lightdm before login - see the install script + +echo "Switcher started" > /tmp/switcher.log +echo "Synergy started" > /tmp/synergy.log + +# Needs to be run with sudo so that it can control the monitor +# (this happens if allow it to be run by lightdm, see the install script) + +# Run synergy client where output goes to console so can monitor for screen changes +LAST_LINE= +synergyc -f -d INFO 192.168.1.112 2>&1 | while read LINE +do + if echo $LINE | grep -q "leaving screen" + then + if [ "$LAST_LINE" != "$LINE" ] + then + # Send a DDC command to the monitor (This is specific for the specific DELL monitor) + + # ddccontrol -r 0x60 -w 18 dev:/dev/i2c-4 2&>1 > /dev/null + + echo "Switching --$LINE--" >> /tmp/switcher.log + LAST_LINE=$LINE + fi + fi + echo $LINE >> /tmp/synergy.log +done diff --git a/Environment/synergy/InstallSynergy.sh b/Environment/synergy/InstallSynergy.sh new file mode 100755 index 0000000..9a9b284 --- /dev/null +++ b/Environment/synergy/InstallSynergy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo apt-get install synergy +sudo apt-get install ddccontrol +sudo cp lightdm.conf /etc/lightdm/lightdm.conf +sudo mkdir -p /etc/synergy +sudo cp MoniterSwitcher.sh /etc/synergy +sudo cp StartMoniter.sh /etc/synergy diff --git a/Environment/synergy/MonitorSwitcher.sh b/Environment/synergy/MonitorSwitcher.sh new file mode 100755 index 0000000..4e2174c --- /dev/null +++ b/Environment/synergy/MonitorSwitcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Switch Display input on screen change (DELL 24" monitor specific) +# by John Ryland +# Copyright 2018 +# + +# This can be made to be run by lightdm before login - see the install script + +echo "Switcher started" > /tmp/switcher.log +echo "Synergy started" > /tmp/synergy.log + +# Needs to be run with sudo so that it can control the monitor +# (this happens if allow it to be run by lightdm, see the install script) + +# Run synergy client where output goes to console so can monitor for screen changes +LAST_LINE= +synergyc -f -d INFO 192.168.1.112 2>&1 | while read LINE +do + if echo $LINE | grep -q "leaving screen" + then + if [ "$LAST_LINE" != "$LINE" ] + then + # Send a DDC command to the monitor (This is specific for the specific DELL monitor) + + # ddccontrol -r 0x60 -w 18 dev:/dev/i2c-4 2&>1 > /dev/null + + echo "Switching --$LINE--" >> /tmp/switcher.log + LAST_LINE=$LINE + fi + fi + echo $LINE >> /tmp/synergy.log +done diff --git a/Environment/synergy/StartMonitor.sh b/Environment/synergy/StartMonitor.sh new file mode 100755 index 0000000..e6433ca --- /dev/null +++ b/Environment/synergy/StartMonitor.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +/etc/synergy/MonitorSwitcher.sh & + diff --git a/Environment/synergy/InstallSynergy.sh b/Environment/synergy/InstallSynergy.sh new file mode 100755 index 0000000..9a9b284 --- /dev/null +++ b/Environment/synergy/InstallSynergy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo apt-get install synergy +sudo apt-get install ddccontrol +sudo cp lightdm.conf /etc/lightdm/lightdm.conf +sudo mkdir -p /etc/synergy +sudo cp MoniterSwitcher.sh /etc/synergy +sudo cp StartMoniter.sh /etc/synergy diff --git a/Environment/synergy/MonitorSwitcher.sh b/Environment/synergy/MonitorSwitcher.sh new file mode 100755 index 0000000..4e2174c --- /dev/null +++ b/Environment/synergy/MonitorSwitcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Switch Display input on screen change (DELL 24" monitor specific) +# by John Ryland +# Copyright 2018 +# + +# This can be made to be run by lightdm before login - see the install script + +echo "Switcher started" > /tmp/switcher.log +echo "Synergy started" > /tmp/synergy.log + +# Needs to be run with sudo so that it can control the monitor +# (this happens if allow it to be run by lightdm, see the install script) + +# Run synergy client where output goes to console so can monitor for screen changes +LAST_LINE= +synergyc -f -d INFO 192.168.1.112 2>&1 | while read LINE +do + if echo $LINE | grep -q "leaving screen" + then + if [ "$LAST_LINE" != "$LINE" ] + then + # Send a DDC command to the monitor (This is specific for the specific DELL monitor) + + # ddccontrol -r 0x60 -w 18 dev:/dev/i2c-4 2&>1 > /dev/null + + echo "Switching --$LINE--" >> /tmp/switcher.log + LAST_LINE=$LINE + fi + fi + echo $LINE >> /tmp/synergy.log +done diff --git a/Environment/synergy/StartMonitor.sh b/Environment/synergy/StartMonitor.sh new file mode 100755 index 0000000..e6433ca --- /dev/null +++ b/Environment/synergy/StartMonitor.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +/etc/synergy/MonitorSwitcher.sh & + diff --git a/Environment/synergy/SynergyServer.tar.gz b/Environment/synergy/SynergyServer.tar.gz new file mode 100644 index 0000000..644bdb0 --- /dev/null +++ b/Environment/synergy/SynergyServer.tar.gz Binary files differ diff --git a/Environment/synergy/InstallSynergy.sh b/Environment/synergy/InstallSynergy.sh new file mode 100755 index 0000000..9a9b284 --- /dev/null +++ b/Environment/synergy/InstallSynergy.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo apt-get install synergy +sudo apt-get install ddccontrol +sudo cp lightdm.conf /etc/lightdm/lightdm.conf +sudo mkdir -p /etc/synergy +sudo cp MoniterSwitcher.sh /etc/synergy +sudo cp StartMoniter.sh /etc/synergy diff --git a/Environment/synergy/MonitorSwitcher.sh b/Environment/synergy/MonitorSwitcher.sh new file mode 100755 index 0000000..4e2174c --- /dev/null +++ b/Environment/synergy/MonitorSwitcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Switch Display input on screen change (DELL 24" monitor specific) +# by John Ryland +# Copyright 2018 +# + +# This can be made to be run by lightdm before login - see the install script + +echo "Switcher started" > /tmp/switcher.log +echo "Synergy started" > /tmp/synergy.log + +# Needs to be run with sudo so that it can control the monitor +# (this happens if allow it to be run by lightdm, see the install script) + +# Run synergy client where output goes to console so can monitor for screen changes +LAST_LINE= +synergyc -f -d INFO 192.168.1.112 2>&1 | while read LINE +do + if echo $LINE | grep -q "leaving screen" + then + if [ "$LAST_LINE" != "$LINE" ] + then + # Send a DDC command to the monitor (This is specific for the specific DELL monitor) + + # ddccontrol -r 0x60 -w 18 dev:/dev/i2c-4 2&>1 > /dev/null + + echo "Switching --$LINE--" >> /tmp/switcher.log + LAST_LINE=$LINE + fi + fi + echo $LINE >> /tmp/synergy.log +done diff --git a/Environment/synergy/StartMonitor.sh b/Environment/synergy/StartMonitor.sh new file mode 100755 index 0000000..e6433ca --- /dev/null +++ b/Environment/synergy/StartMonitor.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +/etc/synergy/MonitorSwitcher.sh & + diff --git a/Environment/synergy/SynergyServer.tar.gz b/Environment/synergy/SynergyServer.tar.gz new file mode 100644 index 0000000..644bdb0 --- /dev/null +++ b/Environment/synergy/SynergyServer.tar.gz Binary files differ diff --git a/Environment/synergy/lightdm.conf b/Environment/synergy/lightdm.conf new file mode 100755 index 0000000..b2a6c1d --- /dev/null +++ b/Environment/synergy/lightdm.conf @@ -0,0 +1,2 @@ +[Seat:*] +greeter-setup-script=/etc/synergy/StartMonitor.sh