File kodi.service of Package kodi
[Unit]
Description = Kodi Media Center (Started with xinit)
After = systemd-user-sessions.service network.target sound.target
# if you need the MySQL DB backend, use this block instead of the previous
# After = systemd-user-sessions.service network.target sound.target mysql.service
# Wants = mysql.service
Conflicts=getty@tty7.service
[Service]
#User = kodi
#Group = kodi
#PAMName=login # you might want to try this one, did not work on all systems
Type = simple
TTYPath=/dev/tty7
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone
Restart = on-abort
RestartSec = 5
StandardInput = tty
[Install]
WantedBy = multi-user.target