Automatically restart Kodi when it crashes (while using a window manager)
#9
upstart or systemd are very good in running programs in UI. Try the script which I have given above. The main ingredient is to set the appropriate DISPLAY env variable. What is your OS based on systemd or upstart ? @liebezeit

For xfce you can replace lighdm with display-manager


[Unit]
Description = start Kodi
Requires = display-manager.service
PartOf = display-manager.service

[Service]
User = xbmc
Group = xbmc
Environment = DISPLAY=:0.0
ExecStartPre = /bin/sleep 1
ExecStart = /usr/bin/kodi
ExecStop = /usr/bin/pkill -9 kodi.bin
Restart = on-failure

[Install]
WantedBy = multi-user.target
Reply


Messages In This Thread
RE: Automatically restart Kodi when it crashes (while using a window manager) - by fatalkill3r - 2017-07-18, 15:49
Logout Mark Read Team Forum Stats Members Help
Automatically restart Kodi when it crashes (while using a window manager)0