|
|
@@ -18,8 +18,21 @@
|
|
|
# along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
|
|
|
#
|
|
|
|
|
|
-unset XAUTHORITY
|
|
|
-xauth add $(xauth list | tail -n1)
|
|
|
-disp=`xauth list | tail -n1 | cut -f1 -d' ' | cut -f2 -d':'`
|
|
|
-/usr/bin/xset -display ":$disp" dpms force off
|
|
|
+infofn="/tmp/kiosk.info"
|
|
|
+
|
|
|
+export DISPLAY=':0'
|
|
|
+export XAUTHORITY='/home/pi/.Xauthority'
|
|
|
+
|
|
|
+if [[ -e "/tmp/kiosk.info" ]] ; then
|
|
|
+
|
|
|
+ disp=`grep DISPLAY $infofn | cut -f2 -d'='`
|
|
|
+ auth=`grep XAUTHORITY $infofn | cut -f2 -d'='`
|
|
|
+
|
|
|
+ export DISPLAY="$disp"
|
|
|
+ export XAUTHORITY="$auth"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+/usr/bin/xset dpms force off
|
|
|
+exit 0
|
|
|
|