Create own role for yavdr-desktop
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Detect second DISPLAY using xrandr
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -c 'export DISPLAY=$DISPLAY.1; xrandr -q | grep "connected" && echo "DISPLAY=$DISPLAY" > ~/.second_display || rm -f ~/.second_display'
|
||||
|
||||
[Install]
|
||||
WantedBy=yavdr-desktop.target
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=LIRC command handler
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/irexec %h/.lircrc
|
||||
|
||||
[Install]
|
||||
WantedBy=yavdr-desktop.target
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Start openbox on the second DISPLAY if it exists
|
||||
After=detect-second-display.service
|
||||
Wants=detect-second-display.service
|
||||
Before=yavdr-frontend.service
|
||||
ConditionFileNotEmpty=%h/.second_display
|
||||
|
||||
[Service]
|
||||
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
|
||||
EnvironmentFile=%h/.second_display
|
||||
ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml
|
||||
ExecStartPost=/bin/bash %h/.fehbg
|
||||
|
||||
[Install]
|
||||
WantedBy=yavdr-desktop.target
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Start a kiosk browser on the second DISPLAY if it exists
|
||||
After=detect-second-display.service openbox-second.service
|
||||
Wants=detect-second-display.service openbox-second.service
|
||||
ConditionFileNotEmpty=%h/.second_display
|
||||
|
||||
[Service]
|
||||
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
|
||||
EnvironmentFile=%h/.second_display
|
||||
Environment=url="http://localhost:4444/skins/horchiTft/index.html?theme=anthraize&onlyView=1"
|
||||
Environment=browser="kiosk-browser"
|
||||
EnvironmentFile=-%h/.config/osd2web/config
|
||||
ExecStart=/usr/bin/on_vdr -o -c '${browser} "${url}"'
|
||||
KillSignal=SIGINT
|
||||
|
||||
[Install]
|
||||
WantedBy=yavdr-desktop.target
|
||||
12
roles/yavdr-desktop/templates/systemd/user/tmux.service.j2
Normal file
12
roles/yavdr-desktop/templates/systemd/user/tmux.service.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Start tmux in detached session
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-%h/.session-env
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/tmux new-session -s use-session -d
|
||||
ExecStop=/usr/bin/tmux kill-session -t %u
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=exit window manager gracefully
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/true
|
||||
ExecStop=/usr/bin/openbox --exit
|
||||
RemainAfterExit=True
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=yaVDR Desktop
|
||||
Requires=default.target
|
||||
After=default.target pulseaudio.service
|
||||
Wants=dbus.service pulseaudio.service
|
||||
AllowIsolate=yes
|
||||
Reference in New Issue
Block a user