Ubuntu: Autostart XBMC at boot



Question:

I'm running Ubuntu 12.10 desktop 64-bit. I've installed the latest version of XBMC (Eden). Everything seems to be working great.

The only small issue I'm running into is that I can't figure out how to make XBMC launch automatically on boot/restart. In the 'Startup Applications Preferences' dialog in Ubuntu I have added a new launcher with the command

/usr/bin/xbmc  

and ticked the checkbox next to it. When I restart though XBMC doesn't launch. I know this is the correct path because I ran

which xbmc  

in the Terminal to confirm it.

Am I doing something really stupid here? How come XBMC won't launch automatically? It works fine if I click its icon in the dock.

Many thanks,


Solution:1

Run:

gedit ~/.config/autostart/xbmc.desktop  

write in file

[Desktop Entry]  Type=Application  Exec=xbmc -d 5 --standalone -fs  Hidden=false  NoDisplay=false  X-GNOME-Autostart-enabled=true  Name[en_En]=xbmc  Name=xbmc  Comment[en_En]=  Comment=  

save file and restart system.

XBMC will start with five second delay, in standalone mode and full screen mode.


Solution:2

I had a small issue getting it to run automatically too, doing the same thing. My issue was that it would not start full screen, even when passing it the -fs argument. As Bruno Pereira has suggested, using the XBMC session works great. Click the little Ubuntu symbol next to your username when you log in and select XBMC. If you have set your computer to auto-login, you will have to log out to do this. Then when you want to do something on your computer not XBMC related, simply log off, and log back in, changing the session back to Ubuntu.

The other option, which may work for you is to create a small script like this:

#!/bin/bash  /bin/sleep 5  /usr/bin/xbmc -fs  

Save this somewhere as xbmcstartscript.sh, then use

chmod +x xbmcstartscript.sh

to make it executable. Now use that script for your startup application, instead of pointing directly to XBMC.

Apparently there is some sort of conflict/race condition where XBMC will try to start up before Unity is done loading, so you need to wait a few seconds before opening XBMC.


Solution:3

A better option is to make XBMC your session. You won't get into unity etc, so it's all a bit cleaner.

  1. if you auto-log in, then logout of your current session.
  2. on the log-in screen, press the ubuntu logo next to your name
  3. choose 'XBMC'
  4. log in.

This makes XBMC go all fullscreen when you (auto?) log in.


Solution:4

Are you using encrypted home directories? If so, the autologin features, and the scripts above + elsewhere, didn't work for me on 14.04 (one of them created a nasty loop which left me unable to login locally; thankfully I could get terminal access through webmin).

Anyway, what did work for me was unencrypting the home directories per the instructions here (modified slightly as I found some bits unclear):

(1) Login to an administrator account.

(2) Open a terminal window and backup your home directory/ies - you will need to do this for all users on the system, as this process removes encryption for everyone. Change 'user' below to the names of your users.

sudo cp -rp /home/user /home/user.backup

(3) Check there are no errors in the copy process; there shouldn't be, but you are about to delete the original, so worth making sure.

(4) Delete your home directory/ies:

rm -rf /home/user

(5) Remove the encryption packages

sudo apt-get remove ecryptfs-utils libecryptfs0

(6) Restore your home directory

sudo mv /home/user.backup /home/user

(7) Reboot The original instructions suggested removing any .Private .ecryptfs folders; I didn't have to do this, but you may.

rm -rf ~/.Private rm -rf ~/.ecryptfs

(8) Because I'd already set the user account I wanted to autologin in the system / users panel, when I rebooted it logged straight in.

(9) If you then open the Dash (click the ubuntu symbol in the top left) and search for "startup applications" per the answer above, I had success just calling "kodi".


Solution:5

You could simply use Ubuntu's Startup Application to start Kodi as standalone. In the name field put the name of the startup such as Kodi. In the command field put "-d 5 --standalone -fs". To exit Kodi to Ubuntu Desktop, click on the exit icon in Kodi at the bottom left of the Kodi home screen.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »