I want xbmc to start on boot, as well as restart when it crashes. Currently, I auto-login to a user ('public') and have xbmc as a startup application. But if xbmc crashes it does not restart, which is problematic for my computer-illiterate family, if not for me personally. Since I am used to /etc/init/ scripts, I followed this guide, creating the following script (but with USER=public instead of 'xbmc'):
# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc
description "XBMC-barebones-upstart-script"
author "Matt Filetto"
start on (filesystem and stopped udevtrigger)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
script
exec su -c "xinit /usr/bin/xbmc --standalone -- -nocursor :0" $USER
end script
It works perfectly in the sense that the machine boots into xbmc, but now I have no sound! And when I exit xbmc, it directly restarts, which means that I cannot (that is, I do not have the skills to know how to, at least) check the sound settings from Unity.
Advice on how to get the sound working?