Skip to content
Snippets Groups Projects
Commit 26b31185 authored by nimrod's avatar nimrod
Browse files

Kodi service.

Use the one from https://github.com/xbmc/xbmc/pull/14905 but with slight
tweaks. Keyboard input still isn't working, but it starts up reliably.
parent 1907f7a3
No related branches found
No related tags found
No related merge requests found
[Unit]
Description=Kodi Media Center
Requires=dbus.socket
After=network.target
After=sound.target
[Service]
User=kodi
ExecStart=flatpak run --device=dri --filesystem=home --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=gbm
KillMode=control-group
Restart=always
[Install]
WantedBy=multi-user.target graphical.target
[Unit]
Description=Kodi Media Center on %i
After=systemd-user-sessions.service sound.target network-online.target
# Require the library to be mounted.
After=srv-library.mount
# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket
Conflicts=getty@%i.service
Before=graphical.target
# On systems without virtual consoles, don't start
ConditionPathExists=/dev/tty0
[Service]
User=kodi
PAMName=login
ExecStart=flatpak run --device=dri --filesystem=home --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=gbm -fs
Type=simple
Restart=on-abort
RestartSec=5
KillMode=control-group
# A virtual terminal is needed.
TTYPath=/dev/%i
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
# Fail to start if not controlling the tty.
StandardOutput=tty
StandardInput=tty
StandardError=journal
# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=%i
UtmpMode=user
[Install]
WantedBy=graphical.target
DefaultInstance=tty7
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
- name: Copy service - name: Copy service
copy: copy:
dest: /etc/systemd/system/kodi.service dest: /etc/systemd/system/
mode: preserve mode: preserve
src: kodi.service src: kodi@.service
- name: Enable service - name: Enable service
service: service:
daemon-reload: true daemon-reload: true
enabled: true enabled: true
name: kodi.service name: kodi@tty7.service
state: started state: started
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment