Modern Dark Blog

A modern, fast, and SEO-optimized dark blog built with Jekyll. Minimal dependencies, maximum performance.

How to Autostart Kodi on Raspberry Pi using only ONE command

Most people have a dedicated Raspberry Pi sitting behind a TV to act as a media center, and so they don’t want the hassle of having to connect via SSH or wireless keyboard to start Kodi whenever the Raspberry Pi is rebooted for any reason.

There are a lot of answers and solutions to this question, while some solutions work, they are neither easy nor straight-forward and most probably you will have to try a lot of solutions to find one that’s working for you.

But now I found how to make this happen with only ONE command. This is possible because Raspbian is running the LXDE window manager, and thanks to ArchWiki I found out how to autostart an application in a safe and easy way.

All you have to do is to login to your Raspberry Pi, open a terminal, and paste the below line:

echo "@kodi" >> ~/.config/lxsession/LXDE-pi/autostart

Basically, we are instructing LXDE to run Kodi after launching the window manager. That’s it, as simple as that.

If you want to know more or make Kodi autostart for any and all users, you can read more at ArchWiki’s page about LXDE.


Originally published on mtantawy.com