Kodi Community Forum

Full Version: Cannot create autorun to launch kodi automatically
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

When I want to create a autorun to launch kodi at startup following this tutorial:

http://kodi.wiki/view/HOW-TO:Autostart_Kodi_for_Linux

I got some message saying that I cannot write in the folders etc/init.

I`ve tried to change the permissions of each folder. But it still not working as it says that I am not the administrator. However, by looking at my rights of superuser, I am the administrator. Is there a way to create a script that will create automatically the launcher autorun for kodi.

Thanks for your help,
how do you determine that you are in fact root?
you have to start the editor with root rights, either by being root or by using sudo
If all you want to do is run Kodi as soon as the desktop comes up, you just need to go to Preferences >> Startup applications (or that's where it is on my desktop - which isn't Unity - so could be different for you) and add Kodi in there.

You can set your account to auto-login in Administration >> User accounts, and then the whole thing would start up and go straight into Kodi. That's exactly what I do on a MythTV backend system that runs Kodi as the frontend.

If you really want to start something as part of the true boot up process by adding an Upstart job (which are what are in /etc/init in 14.04, at least) you need to be root, So for example from a terminal run gksudo gedit /etc/init/some_file.conf (or whatever editor you use).

However I suspect from the way you wrote your question you may not be familiar with Upstart and how it works and how its scripts work, so if so I'd suggest you google it and read about it carefully first. There be dragons.
Do I misread something or did the OP not mention the OS he uses? I could imagine that this might depend on how "root" is handled.
(2016-03-18, 19:03)Arielis Wrote: [ -> ]I got some message saying that I cannot write in the folders etc/init.

I`ve tried to change the permissions of each folder.

That's a really bad thing to attempt. You'll more than likely end up completely breaking your Linux install.

To write into /etc/init you need to be the root user, or have root user permissions as these are system directories.

How to do this varies by distribution but it'll either be su or sudo. If your distribution is Debian/Ubuntu based, it'll be sudo.

So for example, you could type this into a terminal sudo nano /etc/init/kodi.conf .When asked for a password, put in the password you normally use to login with.

This will start nano (the default terminal text editor in Ubuntu) with root permissions. Then type in the file from the wiki, or copy/paste the text. Save & exit.

Note that this example is based upon an Ubuntu distro and other flavours of Linux may/will use a different text editor.
I am using Ubuntu 14.04

I finally managed to create the kodi.conf as asked in the tutorial. The thing now if that the desktop doesn`t do anything. It`s like there is no file and always start as usual.

Anyone had already the same error?

Thanks