aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Eikenes <viddy@viddy.no>2015-04-05 00:41:21 +0200
committerroot <root@einstein.tg15.gathering.org>2015-04-05 00:41:21 +0200
commit727eb6df7d580be86a82514c02f1123a58673a90 (patch)
tree4e07aa9c2991e54010cf02e20b45ff589856df83
parent2954738b00ee4811547912a1af275f17f1aacfb1 (diff)
Add teh infoscreen stuffs
-rw-r--r--examples/tg15/infoscreens/README.md10
-rw-r--r--examples/tg15/infoscreens/bash_profile8
-rw-r--r--examples/tg15/infoscreens/getty@tty6.service46
-rw-r--r--examples/tg15/infoscreens/revolve.html64
-rw-r--r--examples/tg15/infoscreens/start-grid.sh47
-rw-r--r--examples/tg15/infoscreens/xinitrc5
6 files changed, 180 insertions, 0 deletions
diff --git a/examples/tg15/infoscreens/README.md b/examples/tg15/infoscreens/README.md
new file mode 100644
index 0000000..f676e91
--- /dev/null
+++ b/examples/tg15/infoscreens/README.md
@@ -0,0 +1,10 @@
+You need some packages for all this crap, install them:
+apt-get install agetty chromium mpv i3 unclutter xdotool
+
+To autologin as your user:
+getty@tty6.service belongs in /etc/systemd/system/getty.target.wants/getty@tty6.service
+
+To actually make that user start stuff:
+xinitrc belongs in ~/.xinitrc
+bash_profile belongs in ~/.bash_profile
+start-grid.sh belongs somewhere where you run it after i3 is started
diff --git a/examples/tg15/infoscreens/bash_profile b/examples/tg15/infoscreens/bash_profile
new file mode 100644
index 0000000..bdf9a1c
--- /dev/null
+++ b/examples/tg15/infoscreens/bash_profile
@@ -0,0 +1,8 @@
+if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty6 ]; then
+while [ 1 == 1 ]
+ do
+ startx
+ echo "Stuff died. Waiting in case you want to cancel."
+ sleep 2
+ done
+fi
diff --git a/examples/tg15/infoscreens/getty@tty6.service b/examples/tg15/infoscreens/getty@tty6.service
new file mode 100644
index 0000000..cba59d8
--- /dev/null
+++ b/examples/tg15/infoscreens/getty@tty6.service
@@ -0,0 +1,46 @@
+# systemd tty-file, haxed for autologin
+# needs agetty
+# Tech:server
+
+[Unit]
+Description=Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+After=systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+# On systems without virtual consoles, don't start any getty. (Note
+# that serial gettys are covered by serial-getty@.service, not this
+# unit
+ConditionPathExists=/dev/tty0
+
+[Service]
+# the VT is cleared by TTYVTDisallocate
+ExecStart=-/sbin/agetty --autologin lol %I 38400
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Unset locale for the console getty since the console has problems
+# displaying some internationalized messages.
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+# Some login implementations ignore SIGTERM, so we send SIGHUP
+# instead, to ensure that login terminates cleanly.
+KillSignal=SIGHUP
+
+[Install]
+Alias=getty.target.wants/getty@tty1.service
diff --git a/examples/tg15/infoscreens/revolve.html b/examples/tg15/infoscreens/revolve.html
new file mode 100644
index 0000000..bacef9a
--- /dev/null
+++ b/examples/tg15/infoscreens/revolve.html
@@ -0,0 +1,64 @@
+<html>
+ <head>
+ <title>Everybody do the revolve</title>
+ <style type="text/css">
+ body {
+ margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin: 0 auto;
+ }
+
+ #slide {
+ visibility: hidden;
+ position: absolute;
+ bottom: 0px;
+ top: 0px;
+ left: 0px;
+ margin: 0px;
+ overflow-y: hidden;
+ overflow-x: hidden;
+ }
+
+ #subframe {
+ width: 1920px;
+ height: 1080px;
+ }
+ </style>
+ <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
+ <script type="text/javascript">
+ var page = 0;
+ var iframes = 3;
+ var delay = 10;
+
+ function rotate() {
+ $('body').delay(delay*1000).queue(function(next) {
+ $('div').each(function(i, obj) {
+ if (i == page) {
+ this.style.visibility = 'visible';
+ } else {
+ this.style.visibility = 'hidden';
+ }
+ });
+ next();
+ rotate();
+ });
+ page = (page + 1) % iframes;
+ }
+
+ $(document).ready(function(){
+ rotate();
+ });
+ </script>
+ </head>
+ <body>
+ <div id="slide" style="visibility: visible;">
+ <iframe class="frames" id="subframe" frameborder="0" src="http://nms.tg15.gathering.org/temp.html" scrolling="no"></iframe>
+ </div>
+
+ <div id="slide">
+ <iframe class="frames" id="subframe" frameborder="0" src="http://nms.tg15.gathering.org/ping.html" scrolling="no"></iframe>
+ </div>
+
+ <div id="slide">
+ <iframe class="frames" id="subframe" frameborder="0" src="http://nms.tg15.gathering.org/dhcpkart.pl" scrolling="no"></iframe>
+ </div>
+ </body>
+</html>
diff --git a/examples/tg15/infoscreens/start-grid.sh b/examples/tg15/infoscreens/start-grid.sh
new file mode 100644
index 0000000..45df153
--- /dev/null
+++ b/examples/tg15/infoscreens/start-grid.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+# Make some grids, you need i3, xdotool, mpv and chromium installed.
+# Tech:Server
+export DISPLAY=:1
+
+MAXWAIT=30
+
+# Start the given command and wait until it's visible
+safestart()
+{
+ "$@" &
+ mypid=$!
+ for i in `seq $MAXWAIT`
+ do
+ if xdotool search --onlyvisible --pid $mypid; then
+ return 0
+ fi
+ sleep 1
+ done
+ xmessage "Error on executing: $@" &
+}
+
+
+safestart mpv --no-audio -vo opengl -hwdec vaapi --cache no --cache-default no --osd-msg1 "cubemap: creativia.ts" http://cubemap.tg15.gathering.org/creativia.ts
+i3-msg border none
+sleep 1
+
+safestart mpv --no-audio -vo opengl -hwdec vaapi --cache no --cache-default no --osd-msg1 "cubemap: southcam.flv" http://cubemap.tg15.gathering.org/southcam.flv
+i3-msg border none
+sleep 1
+
+i3-msg split v
+sleep 1
+
+safestart mpv --no-audio -vo opengl -hwdec vaapi --cache no --cache-default no --osd-msg1 "cubemap: game.ts" http://cubemap.tg15.gathering.org/game.ts
+i3-msg border none
+sleep 1
+
+i3-msg focus left
+i3-msg split v
+safestart mpv --no-audio -vo opengl -hwdec vaapi --cache no --cache-default no --osd-msg1 "cubemap: event.ts" http://cubemap.tg15.gathering.org/event.ts
+sleep 1
+i3-msg border none
+
+#i3-msg 'workspace 2:Browser;exec chromium --kiosk --incognito http://stats.tg15.gathering.org'
+
+exit 0
diff --git a/examples/tg15/infoscreens/xinitrc b/examples/tg15/infoscreens/xinitrc
new file mode 100644
index 0000000..4061490
--- /dev/null
+++ b/examples/tg15/infoscreens/xinitrc
@@ -0,0 +1,5 @@
+i3 &
+xset s off
+xset -dpms
+xset s noblank
+unclutter -root -idle 1