I've got Kodi 17 Krypton and would like to start the app automatically when the Raspberry Pi boots.
How can I do this?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
Aside from the answers already provided by others, you could also utilise the crontab to do this fairly easily provided that you have already disabled starting Raspbian GUI on startup via
sudo crontab -e
Then add the following line:
@reboot kodi --standalone
Thorough description on my blog post.
For Raspbian GNU/Linux 9 (Stretch), the following is used to autostart kodi at boot:
Edit file /etc/default/kodi and set
Unmask and enable the kodi systemd service:
sudo systemctl unmask kodi.service
sudo systemctl enable kodi.service
In my case to append "kodi &" at the end of "/etc/rc.local" does not work.
Neither the option of "ENABLED=1" into "/etc/default/kodi", because the file and the startup scripts does not exist.
I have tried to append the following instead that is working for me:
sudo -b -u pi kodi
By the way, if somebody knows how to set up it using a service, and respawn the service when it shut down for any reason, it could be very cool.
I am using raspbian as linux distribution.
Don't take this the wrong way but would OpenELEC be more suitable? If not, add it to /etc/rc.local just above the last line.
Something like that but you may need the full path.
To have it start automatically you just have to do
sudo systemctl enable kodi
and later if you want to remove it
sudo systemctl disable kodi
Start by running
@reboot sudo -b -u pi kodi
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?