How can I autostart a headless Kodi on Lubuntu?

I am running Kodi on Lubuntu (Ubuntu) 20.10 on an Intel NUC, but I think this works in general. I wanted the system to auto-login and auto-start into Kodi.

I installed Lubuntu on a fresh system and just issued an apt-get install kodi. (you can also use apt install kodi, if you are more modern than me)

  • System: Linux NUC2 5.8.0-53-generic #60-Ubuntu SMP Thu May 6 07:46:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Kodi: 18.8: Debian package version: 2:18.8+dfsg1-2 Media Center Kodi from Debian

My default window system is LXQt, successor of LXDE.

I wonder what the best way is to do this, and if this also works on other not-dedicated Kodi machines like Raspberry Pi, etc.?

1

1 Answer

Took me 2 hours to search and figure out, I think this can help others to do this in 10 minutes.

Step 1:Create a user with "auto login". In my case, I had created a user "start" that automagically logs in without a password. How? In LXQt: go to Start --> Preferences --> LXQ Settings --> Users and Groups. Create that user.

You can use command line if you prefer, and adjust it like this:vi /etc/sddm.confYou can also put a user here with a password, that user will also auto-login

Step 2: Auto-start KodiIn the home directory of that user (in my case "start"), copy the file /usr/share/applications/kodi.desktop to .config/autostart

Log in as "start"

mkdir /home/start/.config/autostart
cd /home/start/.config/autostart
cp /usr/share/applications/kodi.desktop ./

(I am skipping the ~/ notation to make it easier for beginners)

Hint: Rename /usr/share/applications/kodi.desktop to kodi.desktop.txt and it will reboot into LXQt again in stead of Kodi.

General hint 1:Turn off or modify the screensaver of your windowing system, since it may override Kodi. In LXQt for example: In LXQt --> Preferences --> LXQt Settings --> Screen Saver

General hint 2:Default sound output in my case was analog (the mini-jack port), change it to HDMI in LXQt --> Sound & Video --> PulseAdio Volume Control --> tab 'configuration' --> "Digital Stereo Output". After reboot, it returns every time to analog audio, will figure that out later.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like