Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
using_a_samsung_tv_as_computer_screen [25.01.2017 00:50]
Pascal Suter
using_a_samsung_tv_as_computer_screen [25.01.2017 09:34] (current)
Pascal Suter
Line 22: Line 22:
 #!/bin/bash #!/bin/bash
 while true; do while true; do
- xset -q | grep "​Monitor is in Suspend+ xset -q | grep "​Monitor is On
- if [ $? -eq ]; then+ if [ $? -eq ]; then
  if [ "`cat /​tmp/​displaystate`"​ != "​off"​ ]; then   if [ "`cat /​tmp/​displaystate`"​ != "​off"​ ]; then 
- ssh pi@<​raspberryIP> ​'echo '​standby 0' | cec-client -s RPI'+ ssh pi@192.168.168.63 ​'echo '​standby 0' | cec-client -s RPI'
  echo "​off"​ > /​tmp/​displaystate  echo "​off"​ > /​tmp/​displaystate
  fi  fi
Line 31: Line 31:
  else   else 
  if [ "`cat /​tmp/​displaystate`"​ != "​on"​ ]; then   if [ "`cat /​tmp/​displaystate`"​ != "​on"​ ]; then 
-                 ssh pi@<​raspberryIP> ​'echo 'on 0' | cec-client -s RPI'+                 ssh pi@192.168.168.63 ​'echo 'on 0' | cec-client -s RPI'
                  echo "​on"​ > /​tmp/​displaystate                  echo "​on"​ > /​tmp/​displaystate
          fi          fi