5

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,

4
  • 1
    Why not just use the auto login feature and choose the XBMC session created when you install it? Oct 30, 2012 at 14:52
  • I don't understand what you mean by this (sorry - new to Linux) Oct 30, 2012 at 15:18
  • @BrunoPereira I did the method you mentioned but I think my xbmc session does not have permission rights. I can't open the existing files. But It works fine when just using the auto start application feature of Ubuntu
    – GaryP
    Aug 15, 2013 at 17:30
  • Then you need to adjust your permissions on your files, I would say... Aug 16, 2013 at 8:33

5 Answers 5

9

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.

3
  • 1
    'gedit' would automatically create the file, so the 'touch' command is not necessary (especially since it had a typo). I removed it. Jan 25, 2013 at 23:22
  • Thanks, worked for me too. On question though: the file disappeared from .config/autostart directory... Is this normal?
    – Tinellus
    Oct 30, 2013 at 8:32
  • Ubuntu 20: this doesn't appear to work anymore. No surprise, it's an 8 year old answer. But it's one of the top google hits.
    – jcollum
    Aug 27, 2021 at 5:28
3

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.

2
  • The script didn't work for me. I'll try the session option this evening when I get home. Will I be able to VNC the login screen once I log out (that's how I control the PC)? Oct 31, 2012 at 8:23
  • I don't use VNC anymore but if I recall correctly, by default, VNC only runs when logged in. This may help to run it as a daemon, so you can still connect to it while at the login screen, askubuntu.com/questions/83824/….
    – reverendj1
    Oct 31, 2012 at 14:05
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.

1
  • hmm. I missed the short intro reverendj1 wrote about this, so maybe superfluous, but wrote it as an explanation of the comment on the question :)
    – Nanne
    Jan 26, 2013 at 9:02
1

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".

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .