summaryrefslogtreecommitdiff
path: root/addons/x11infoscreen/usr/local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'addons/x11infoscreen/usr/local/bin')
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-feh19
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-qiv19
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-slideshow16
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-sync18
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-unclutter16
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/launch-x1116
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/mksshauth68
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/pickx86config13
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/savelocaltweaks61
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/slideshow33
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/xsetbin0 -> 36168 bytes
11 files changed, 279 insertions, 0 deletions
diff --git a/addons/x11infoscreen/usr/local/bin/launch-feh b/addons/x11infoscreen/usr/local/bin/launch-feh
new file mode 100755
index 0000000..7e2126a
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-feh
@@ -0,0 +1,19 @@
+#!/usr/bin/launchtool -C
+
+tag = feh
+#command = DISPLAY=:0 feh --full-screen --slideshow-delay 15 /var/lib/infoscreen/*.png; exit 0
+command = export DISPLAY=:0; /usr/local/bin/xset s reset; /usr/local/bin/xset s off; for file in `find /var/lib/infoscreen -name '*.png'`; do feh --rcfile /dev/null --bg-scale $file; sleep 15; done; exit 0
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:feh,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:feh,LOG_DAEMON,LOG_ERR
+command output = syslog:feh,LOG_DAEMON,LOG_INFO
+command errors = syslog:feh,LOG_DAEMON,LOG_ERR
+silent restart time = 5
+silent restart status = 0
diff --git a/addons/x11infoscreen/usr/local/bin/launch-qiv b/addons/x11infoscreen/usr/local/bin/launch-qiv
new file mode 100755
index 0000000..347fa84
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-qiv
@@ -0,0 +1,19 @@
+#!/usr/bin/launchtool -C
+
+tag = qiv
+#command = DISPLAY=:0 qiv --full-screen --slideshow-delay 15 /var/lib/infoscreen/*.png; exit 0
+command = export DISPLAY=:0; /usr/local/bin/xset s reset; /usr/local/bin/xset s off; for file in `find /var/lib/infoscreen -name '*.png'`; do qiv -m --root $file; sleep 15; done; exit 0
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:qiv,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:qiv,LOG_DAEMON,LOG_ERR
+command output = syslog:qiv,LOG_DAEMON,LOG_INFO
+command errors = syslog:qiv,LOG_DAEMON,LOG_ERR
+silent restart time = 5
+silent restart status = 0
diff --git a/addons/x11infoscreen/usr/local/bin/launch-slideshow b/addons/x11infoscreen/usr/local/bin/launch-slideshow
new file mode 100755
index 0000000..da4cc8c
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-slideshow
@@ -0,0 +1,16 @@
+#!/usr/bin/launchtool -C
+
+tag = slideshow
+command = /usr/local/bin/slideshow
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:slideshow,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:slideshow,LOG_DAEMON,LOG_ERR
+command output = syslog:slideshow,LOG_DAEMON,LOG_INFO
+command errors = syslog:slideshow,LOG_DAEMON,LOG_ERR
diff --git a/addons/x11infoscreen/usr/local/bin/launch-sync b/addons/x11infoscreen/usr/local/bin/launch-sync
new file mode 100755
index 0000000..f52aa8a
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-sync
@@ -0,0 +1,18 @@
+#!/usr/bin/launchtool -C
+
+tag = sync
+command = rsync -ar --delete infoscreen@lager:/home/jonas/websites/info.dgi-huset.dk/img/ /var/lib/infoscreen/; exit 0
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:sync,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:sync,LOG_DAEMON,LOG_ERR
+command output = syslog:sync,LOG_DAEMON,LOG_INFO
+command errors = syslog:sync,LOG_DAEMON,LOG_ERR
+silent restart time = 300
+silent restart status = 0
diff --git a/addons/x11infoscreen/usr/local/bin/launch-unclutter b/addons/x11infoscreen/usr/local/bin/launch-unclutter
new file mode 100755
index 0000000..1995126
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-unclutter
@@ -0,0 +1,16 @@
+#!/usr/bin/launchtool -C
+
+tag = unclutter
+command = unclutter -idle 1 -root -display ':0'
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:unclutter,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:unclutter,LOG_DAEMON,LOG_ERR
+command output = syslog:unclutter,LOG_DAEMON,LOG_INFO
+command errors = syslog:unclutter,LOG_DAEMON,LOG_ERR
diff --git a/addons/x11infoscreen/usr/local/bin/launch-x11 b/addons/x11infoscreen/usr/local/bin/launch-x11
new file mode 100755
index 0000000..8acff80
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/launch-x11
@@ -0,0 +1,16 @@
+#!/usr/bin/launchtool -C
+
+tag = x11
+command = /usr/bin/X11/XFree86 -allowMouseOpenFail -br -dpms -xf86config `/usr/local/bin/pickx86config`
+daemon = yes
+stats = yes
+#user = myserver
+#root dir = /tmp
+#process count limit = 5
+#open files limit = 10
+wait times = 1,1,1,3,3,3,10,10,10
+infinite runs = yes
+launchtool output = syslog:x11,LOG_DAEMON,LOG_INFO
+launchtool errors = syslog:x11,LOG_DAEMON,LOG_ERR
+command output = syslog:x11,LOG_DAEMON,LOG_INFO
+command errors = syslog:x11,LOG_DAEMON,LOG_ERR
diff --git a/addons/x11infoscreen/usr/local/bin/mksshauth b/addons/x11infoscreen/usr/local/bin/mksshauth
new file mode 100755
index 0000000..9d7c44c
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/mksshauth
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# /usr/local/bin/mksshauth
+# Copyright 2000-2001 Juri Jensen <juri@xenux.dk>
+# Copyright 2002 Juri Jensen <juri@xenux.dk> & Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: mksshauth,v 1.5 2003/03/24 12:08:47 jonas Exp $
+#
+# Setup local and remote SSH for non-interactive authorization
+#
+
+set -e
+
+prg=`basename $0`
+
+if [ $# \< 1 ]; then
+ echo "ERROR: Wrong arguments! (Use '$prg --help' for help)"
+ exit 1
+fi
+keytype=$1
+shift
+
+case "$keytype" in
+ --help|-h)
+ echo "$prg: Setup local and remote SSH for non-interactive authorization."
+ echo
+ echo "Usage: $prg keytype [user@]host [options]"
+ echo
+ echo "Options:"
+ echo " keytype: SSH key type, either rsa1, rsa, dsa, 1 or 2."
+ echo " rsa1 is for SSHv1, rsa and dsa is for SSHv2. 1 and 2 are"
+ echo " aliases for rsa1 and dsa. dsa (or 2) is recommended."
+ echo " user: User id on remote host. Default is same as local user."
+ echo " host: Hostname of remote host."
+ echo " options: Options to prepend the authorization key (read 'man sshd')."
+ exit 0
+ ;;
+ 1|rsa1)
+ keytype=rsa1
+ id_file=identity.pub
+ auth_file=authorized_keys
+ ;;
+ 2|dsa)
+ keytype=dsa
+ id_file=id_dsa.pub
+ auth_file=authorized_keys2
+ ;;
+ rsa)
+ keytype=rsa
+ id_file=id_rsa.pub
+ auth_file=authorized_keys2
+ ;;
+ *)
+ echo "ERROR: Wrong keytype! (Use '$prg --help' for help)"
+ exit 1
+ ;;
+esac
+
+host=$1
+shift
+options=$@
+
+if [ -n "$options" ]; then
+ options="$options "
+fi
+
+[ -f ~/.ssh/$id_file ] || ssh-keygen -t $keytype
+ssh $host "mkdir -p ~/.ssh && echo '$options'`cat ~/.ssh/$id_file` >> ~/.ssh/$auth_file"
diff --git a/addons/x11infoscreen/usr/local/bin/pickx86config b/addons/x11infoscreen/usr/local/bin/pickx86config
new file mode 100755
index 0000000..52dbdc9
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/pickx86config
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# FIXME: Why won't this work?
+#cfgmaybe=`lspci | perl -n -e 's¡^.* VGA .*:\W(\w*).*¡/etc/X11/XF86Config-4-$1¡i && print if -f'`
+
+cfgbase="/etc/X11/XF86Config-4"
+
+cfgmaybe="$cfgbase-`lspci | perl -n -e 's¡^.* VGA .*:\W(\w*).*¡$1¡i && print'`"
+if [ -r "$cfgmaybe" ]; then
+ echo "$cfgmaybe"
+else
+ echo "$cfgbase"
+fi
diff --git a/addons/x11infoscreen/usr/local/bin/savelocaltweaks b/addons/x11infoscreen/usr/local/bin/savelocaltweaks
new file mode 100755
index 0000000..b303cda
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/savelocaltweaks
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#set -e
+
+basedir="/etc"
+targetdir="/tmp/localtweaks"
+includefile="/etc/local/localtweaks.include"
+excludefile="/etc/local/localtweaks.exclude"
+extensions=".orig .old"
+
+for ext in $extensions; do
+ extfiles="`find $basedir -name \*$ext`"
+ for extfile in $extfiles; do
+ xextfile="${extfile%$ext}"
+ files="$files ${xextfile#$basedir}"
+ done
+done
+
+includes=""
+if [ -d "`dirname $includefile`" ] && [ -r $includefile ]; then
+ includes="`cat $includefile`"
+ for include in $includes; do
+ files="$files ${include#$basedir}"
+ done
+fi
+
+excludes=""
+if [ -d "`dirname $excludefile`" ] && [ -r $excludefile ]; then
+ xexcludes="`cat $excludefile`"
+ for exclude in $xexcludes; do
+ excludes="$excludes ${exclude#$basedir}"
+ done
+fi
+
+# process all files once each
+for file in `for x in $files; do echo $x; done | uniq | sort`; do
+
+ for exclude in $excludes; do
+ [ "$file" = "$exclude" ] && continue 2
+ done
+
+ ext=""
+ for xext in $extensions; do
+ if [ -e $basedir/$file$xext ]; then
+ ext="$xext"
+ continue
+ fi
+ done
+
+ newdir="$targetdir/$basedir/`dirname $file`"
+ mkdir -p $newdir
+ cp -af $basedir/$file $newdir
+
+ # Only diff against existing and non-empty files.
+ if [ -n "$ext" ] && [ -s $basedir/$file$ext ]; then
+ diff -ruN $basedir/$file$ext $basedir/$file > $targetdir/$basedir/$file.diff
+ chown --reference=$basedir/$file $targetdir/$basedir/$file.diff
+ chmod --reference=$basedir/$file $targetdir/$basedir/$file.diff
+ chmod a-x $targetdir/$basedir/$file.diff
+ fi
+done
diff --git a/addons/x11infoscreen/usr/local/bin/slideshow b/addons/x11infoscreen/usr/local/bin/slideshow
new file mode 100755
index 0000000..f0c3915
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/slideshow
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$DISPLAY" ]; then
+ export DISPLAY=:0
+fi
+
+# Make sure display is alive and awake
+/usr/local/bin/xset s reset
+/usr/local/bin/xset s off
+
+# Clean out stale directories (hoping noone else use same name!)
+rm -rf /tmp/xslideshow.??????
+
+workdir="`mktemp -d /tmp/xslideshow.XXXXXX`"
+remotehost="lager"
+remoteuser="infoscreen"
+remotedir="/home/jonas/websites/info.dgi-huset.dk/img"
+
+#cd "$workdir"
+
+while true; do
+ rsync -a "$remoteuser@$remotehost":"$remotedir"/*.png "$workdir/"
+ files="`find $workdir -name '*.png' | sort`"
+ for file in $files; do
+# timeslices=`echo $file | sed 's/.*_([0-9]+)s\.png/\1/'`
+# for i in `seq 1 $timeslices`; do
+ qiv -m --root $file
+ sleep 5
+ done
+done
+# qiv -m --slide --delay=5 $files
diff --git a/addons/x11infoscreen/usr/local/bin/xset b/addons/x11infoscreen/usr/local/bin/xset
new file mode 100755
index 0000000..daf82f7
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/xset
Binary files differ