2016-08-09, 14:45
Thank you all for your kind words. I never thought this HOW TO would get any response, as I thought the setup to be too specialized for my usage case.
So on to other things. For autostarting or restarting scripts/programs, there are some different possibilities with this setup.
For programs that require to be run as root (such as xboxdrv and sixad) use /etc/rc.local. You can edit it as ADMIN.
Place your code before “exit 0”.
For programs that should be run as USER and apply to all programs run in the Openbox session use ~/.config/openbox/autostart. You must edit this file as USER.
You might have to copy the files to ~/.config/openbox/ if you haven’t already done so earlier.
For programs that should be run when Kodi starts, stops or is killed use the files in ~/.kodi-openbox/. You must edit these files as USER.
Put some code here to run when a kodi-openbox session successfully starts
Put some code here to run when a kodi-openbox session ends
Put some code here to run when a kodi-openbox session is sent a SIGINT or SIGQUIT
It is also possible to use SystemD as DJBenson suggested.
So on to other things. For autostarting or restarting scripts/programs, there are some different possibilities with this setup.
For programs that require to be run as root (such as xboxdrv and sixad) use /etc/rc.local. You can edit it as ADMIN.
Code:
sudo nano /etc/rc.local
For programs that should be run as USER and apply to all programs run in the Openbox session use ~/.config/openbox/autostart. You must edit this file as USER.
Code:
nano ~/.config/openbox/autostart
You might have to copy the files to ~/.config/openbox/ if you haven’t already done so earlier.
Code:
cp -R /etc/xdg/openbox ~/.config/
For programs that should be run when Kodi starts, stops or is killed use the files in ~/.kodi-openbox/. You must edit these files as USER.
Put some code here to run when a kodi-openbox session successfully starts
Code:
~/.kodi-openbox/onstart
Put some code here to run when a kodi-openbox session ends
Code:
~/.kodi-openbox/onfinish
Put some code here to run when a kodi-openbox session is sent a SIGINT or SIGQUIT
Code:
~/.kodi-openbox/onkill
It is also possible to use SystemD as DJBenson suggested.