2015-05-02, 05:46
OK so I have been pulling my hair out for about a week over this one problem I have since using this guide as a basis for upgrading to Kodi from XBMC on my media centre/server. Everything is fine with Kodi; video, sound, the works as well as all my server features. My singular issue is with the upstart script for kodi. It simply doesn't start.
I am running on Ubuntu 14.04 installed via mini.iso commandline. I have other upstart scripts working fine. However none of the others use the su command to execute.
The script I have is this exactly:
and without fail I get this message in /var/log/upstart/kodi.log upon boot:
* Note that the above is verbatim
The user htpc most definitely exists and is most definitely in the passwd file. Upon boot I end up at a login prompt where I have to login manually as htpc and then launch kodi using the command from the script.
Why oh why oh why won't it just work as intended? Any ideas?
I am running on Ubuntu 14.04 installed via mini.iso commandline. I have other upstart scripts working fine. However none of the others use the su command to execute.
The script I have is this exactly:
Code:
# kodi-upstart
# starts KODI on startup by using xinit.
# by default runs as kodi, to change edit below.
env USER=htpc
description "KODI-barebones-upstart-script"
author "Matt Filetto"
start on (filesystem and net-device-up IFACE!=lo and stopped udevtrigger)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21
script
exec su -c "xinit /usr/bin/kodi --standalone -- /usr/bin/X -bs -nolisten tcp :0" $USER
end script
and without fail I get this message in /var/log/upstart/kodi.log upon boot:
Code:
No passwd entry for user 'htpc
'
The user htpc most definitely exists and is most definitely in the passwd file. Upon boot I end up at a login prompt where I have to login manually as htpc and then launch kodi using the command from the script.
Why oh why oh why won't it just work as intended? Any ideas?