I am using Ubuntu Server to make a Kodi box. I'm using kodi-standalone-service to do so. I have made a shell script (sudo -S <<< "password" systemctl start kodi) to start kodi. When I run it mannually it starts kodi as expected. I need it to run at startup though. The only way I could do so (or at least I thought) was to add @reboot /home/main/startupscript.sh to crontab. And I did so. Now Ubuntu stops after the initial boot log whithout any meaningful error message. And I cant use the terminal. Can you guys help me? Could it be something to do with xorg even though I have it installed? (clearly as I can run it manually) Maybe the command is ran too soon in the boot process?

  • 1
    I assume you’ve tried systemctl enable kodi.service – Appleoddity Jan 5 at 6:07

The proper way to start a service during the boot proccess in a system that uses systemd is by using the enable option.

systemctl enable kodi.service


  • Oh thank you. I had never used a service before. Should've done a little research xd. I've still got a problem though. I can't exit Kodi. When I do it terminates the X server and stays ok "closing log file.X server" until I reboot... (Power button or shutdown signal as I'm working on a virtual machine). Is it a problem with kodi-standalone-service? – Zizico2 Jan 5 at 11:27
  • I have found a way around it. I can just use another tty. It' still bugging me though... – Zizico2 Jan 5 at 11:40
  • Glad it worked. I haven't used this service, so I don't really know how it works. – Manuel Florian Jan 5 at 19:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.