comments 5

How to Autostart Kodi on Raspberry Pi using only ONE command

The second most-asked question after How to Install Latest Kodi 17.1 Krypton on Raspberry Pi is “How to make Kodi Autostart when i boot my Raspberry Pi?”.

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 basically Raspbian is running LXDE window manger, 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

Filed under: Quick Tips, Raspberry Pi

About the Author

Posted by

I am a self-taught geek, I develop websites using PHP/Java/Python, and MySQL/ElasticSearch, over Apache/Nginx; My daily job includes working with Laravel, Magento, WordPress, WooCommerce, and enough system administration to manage servers lying around.

5 Comments

  1. dodli

    hi,
    after doing this i get a black screen.
    kodi is working, ( i can here the sound of the button selection) but the screen is totally black.

    how do we cancel the autostart?
    how do i go back to the desktop from kodi?

    thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *