Skip to content

Commit

Permalink
Add systemd unit files and xinitrc
Browse files Browse the repository at this point in the history
  • Loading branch information
wilhelmy committed Jan 13, 2017
1 parent 2ea7eb8 commit 8243715
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions util/nodejs-httpd.service
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions util/oeffimonitor-x11.service
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions util/xinitrc
Original file line number Diff line number Diff line change
@@ -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/'

0 comments on commit 8243715

Please sign in to comment.