screw xscreensaver
authorOwen Smith <owen@omsmith.ca>
Wed, 15 May 2013 06:28:06 +0000 (02:28 -0400)
committerOwen Smith <owen@omsmith.ca>
Wed, 15 May 2013 06:28:06 +0000 (02:28 -0400)
bootstrap.sh
templates/xscreensaver-command [new file with mode: 0755]

index 771f0e6..b892064 100755 (executable)
@@ -75,3 +75,10 @@ cat ./templates/fstab >> /etc/fstab
 # root sso
 cp ./templates/.k5login /root/.k5login
 
+read -p "Is this an office terminal? " -n 1 -r
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+    # xscreensaver kills machines, redirect to gnome-screensaver
+    cp ./templates/xscreensaver-command /usr/local/bin/xscreensaver-command
+fi
+
diff --git a/templates/xscreensaver-command b/templates/xscreensaver-command
new file mode 100755 (executable)
index 0000000..4875f7e
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+for i in $*; do
+       if [[ $i = -lock ]]; then
+               gnome-screensaver-command -l &
+               exit
+       fi
+done;
+
+/usr/bin/xscreensaver-command $*
+