diff --git a/util/nodejs-httpd.service b/util/nodejs-httpd.service new file mode 100644 index 0000000..76ed27b --- /dev/null +++ b/util/nodejs-httpd.service @@ -0,0 +1,17 @@ +[Unit] +Description=nodejs httpd for oeffimonitor +After=network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/node httpd.js +User=oeffimonitor +Group=oeffimonitor +WorkingDirectory=/srv/oeffimonitor/server +StandardOutput=syslog +StandardError=syslog +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/util/oeffimonitor-x11.service b/util/oeffimonitor-x11.service new file mode 100644 index 0000000..2b33e75 --- /dev/null +++ b/util/oeffimonitor-x11.service @@ -0,0 +1,17 @@ +# systemd unit file for starting the X11 part of the oeffimonitor setup after the nodejs httpd is up +[Unit] +Description=oeffimonitor startx +After=syslog.target network.target nodejs-httpd.service + +[Service] +Type=simple +ExecStart=/usr/bin/startx +User=oeffimonitor +Group=oeffimonitor +StandardOutput=syslog +StandardError=syslog +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/util/xinitrc b/util/xinitrc new file mode 100644 index 0000000..5955c5f --- /dev/null +++ b/util/xinitrc @@ -0,0 +1,14 @@ +#!/bin/sh + +# start a very simple window manager +matchbox-window-manager & + +# hide mouse +unclutter -idle 1 & +xdotool mousemove 1280 1024 & + +# force the screen to never blank +while :; do xset -dpms s off; sleep 20; done & + +# launch browser, restart X if it crashes +midori -e Fullscreen -a 'http://localhost:8080/'