Springy Development

Minimal install of XBMC on Ubuntu Karmic Koala (9.10)

Ok, so I have been building a media centre for about a week now, and I have had a lot of trouble getting it setup and working right, but now XBMC has released version 9.11 alpha 1 version of its popular media centre software which is now compatible with Ubuntu 9.10.

After all the trouble I had, I thought I would share with you how I installed it, and got XBMC to boot on load. I am using an ASUS AT3N7A-I with a 1.6 dual core atom processor and NVidia ION chipset, 2GB of ram and a 1TB hard drive. So I will only be showing you how to use the NVidia drivers for linux, but to be honest NVidia driver support for linux is better than ATI support.

First, download the minimal install of Ubuntu Karmic Koala (12.1mb x86 12.2mb x64)

Download either the x86 or x64 version dependent on your hardware.

Once the disk image has downloaded either burn it to CD or use UNetbootin to boot from a USB pen drive.

Reboot the computer you wish to install xbmc on, and boot from the CD or USB pen drive, you may need to change some settings in your bios to boot from CD or USB.

Start the installation, and follow the onscreen instructions to set your language and keyboard layout. Enter a username and password for your main account, for this I entered xbmc.

The installer will ask you what packages to install, scroll down to OpenSSH Server and press SPACE, then press ENTER to continue.

After the installation has completed, your computer will reboot.

When you get to the login screen, login with the username and password you entered.

Once you have logged in we need to add the PPA for XBMC.

sudo nano /etc/apt/sources.list

And these lines to the end.


deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main
deb http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main

We will need to add the a key to aptitude to stop it complaining.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 64234534 40618B66 CEC06767 318C7509 91E7EE5E

Sometimes the key server will return this error:
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

A trick I found was to ping the key server address, after it responded try and run the previous command again:

ping keyserver.ubuntu.com

Now we need to update aptitude.

sudo apt-get update

Now we will install the NVidia drivers:

sudo apt-get install nvidia-glx-190

You will need to enter your password again.

Next, we want sound for our media, so we will install some sound drivers.

sudo apt-get install linux-sound-base alsa-base alsa-utils

Your user needs to be added to the sound group.

sudo usermod -a -G audio xbmc

Change xbmc to the username that you entered.

The sound level will be set to zero, to change the volumes we need to enter the sound mixer.

sudo alsamixer

Use you up and down keys and set the volumes to the maximum they will go. Press the right key until you get to IEC958, EC958 D, EC958 1 and press M on each of them to un-mute them.

Press ESC to quit out of the mixer.

To make alsa save the volumes run.

sudo alsactl store 0

Now we can install XBMC.

sudo apt-get install xbmc xbmc-skin-* xbmc-eventclients-* xbmc-scripts-*

This will install xbmc, all the skins and eventclients.

Now X will need to know about your monitor, so run:

sudo nvidia-xconfig

XBMC will need to control power settings of the computer:

sudo apt-get install pm-utils policykit

And give your user access to these power features:

sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.hibernate
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions

Again you will have have to change –user xbmc to the username that you entered in the installation.

Now the last thing to do is make XBMC launch at startup.

sudo nano /etc/init/tty1.conf

Change the line

exec /sbin/getty 38400 tty1

To

exec /bin/login -f xbmc < /dev/tty1 > /dev/tty1 2>&1

Next we need to get Ubuntu to clear the screen and start X:

nano ~/.bash_profile

And add these lines to the file:

case "`tty`" in
/dev/tty1) clear && startx &>/dev/null;;
esac

Now we need to tell X to start XBMC:

nano ~/.xsessionrc

Add the lines:

exec xbmc --standalone

This next step is OPTIONAL, to hide all the information about what is being loaded, we shall install a usplash boot screen.

sudo apt-get install usplash libusplash-dev usplash-theme-xbmc-*

Once the splash screen installation has completed we need to select a splash screen:

sudo update-alternatives --config usplash-artwork.so

Enter the number of the splash screen you wish to use, find examples below:

Pulsating Logo
Spinner Black
Spinner Blue
XBMC Logo

All the previews where created by DU-Duke

Next set the screen resolution of your tv in the usplash settings:

sudo nano /etc/usplash.conf

And add these lines:

resx=1920
resy=1080

My TV is 1080p, so the settings above will suite yours if it is full HD, for 720p enter:

resx=1280
resy=720

To make the new splash screen active run:

sudo update-initramfs -u

Now reboot your computer:

sudo reboot

When the computer restarts, you should see the splash screen you selected, and XBMC should boot up.

Now, go into XBMC’s Videos settings and select VDPAU for the render mode (if your graphics card supports it) and edit the Sound settings:

Audio Output: Digital
AC3: Off
DTS: Off
Audio Capable Device: plughw:hdmi
Passthrough Output Device: hdmi
Downmix: On

And that’s it, you should have a fully functional media centre running the latest version of Ubuntu and XBMC.

As this is an alpha version, you will need to perform some updates now and again until the final release is out.

To so this, ssh into your computer and update it:

ssh xbmc@your media centre IP
sudo apt-get upgrade

Now I can’t take all the credit for this, I have collected some information from other sources and put them together from here:

http://xbmc.org/forum/showthread.php?t=53812
http://xbmc.org/forum/showthread.php?t=38804

Thanks to jonassw from XBMC forums, who suggested using the latest version of the NVidia drivers.

54 Responses to “Minimal install of XBMC on Ubuntu Karmic Koala (9.10)”

  1. XBMCFreak.nl » Handleiding minimale Ubuntu 9.10 met XBMC Says:
    November 9th, 2009 at 7:36 am

    [...] http://www.springydevelopment.co.uk/2009/11/08/minimal-install-of-xbmc-on-ubuntu-karmic-koala/ Categories: XBMC Tags: Comments (0) Trackbacks (0) Leave a comment Trackback [...]

  2. Rene Says:
    November 9th, 2009 at 6:59 pm

    Thnx for your manual, i’m trying to setup my new asrock for days without any luck. Will give it a try tomorrow!

  3. BillsGate Says:
    November 9th, 2009 at 8:14 pm

    You state:
    [q]Audio Output: Digital
    AC3: Off
    DTS: Off
    Audio Capable Device: plughw:hdmi
    Passthrough Output Device: hdmi
    Downmix: On[/q]

    I have a DTS capable surround receiver. Do I still need to use these settings?

  4. admin Says:
    November 9th, 2009 at 8:16 pm

    No, enable DTS sound if your receiver supports it, on a normal HD TV without DTS support will make distorted sound.

  5. Barrie Says:
    November 14th, 2009 at 12:42 am

    I’ll be giving your guide a go tomorrow. I’ve tried a dozen other guides on the net since I got my Acer Revo, none have however worked. Your solution seems more in depth than any other I’ve stumbled across though.

    I just hope it works for me…

  6. Mark Says:
    November 19th, 2009 at 10:47 pm

    I have literally spent 3 days trying to get various flavours of XBMC installed on my Reveo R600. The thing has been so close to getting thrown over the balcony so so many times.

    I’m pleased to report that this worked almost completely for me. Bar one thing though - the nvidia drivers (ironically the first step) - I had to follow the instructions here for that http://www.webupd8.org/2009/08/how-to-install-nvidia-190xx-drivers-in.html

    Otherwise. Thank you so so so much,

  7. Nicola Says:
    November 22nd, 2009 at 1:14 am

    With you help i0ve installed XBMC in an Acer Travelmate 737TL.
    Now i’ve to optimize it: it is so slow… Can you suggest me where can i find a tutorial where i can find all the package that are not necessary for a dedicate MC notebook?
    Is there any trip to speed my old old old NB?
    thanks, really thanks

  8. Jonatans projektblog » Installation av Ubuntu + XBMC Says:
    November 23rd, 2009 at 9:16 pm

    [...] använde denna guide som [...]

  9. Montando un HTPC (IV) « escritos zurdos Says:
    November 27th, 2009 at 12:17 pm

    [...] estas recetas actualizo los drivers de nvidia a la version 190 que soportan VDPAU (aceleracion GPU). [...]

  10. Mark Says:
    November 27th, 2009 at 9:29 pm

    You need to add the repository configuration for launchpad.net before you try to install the nvidia drivers (as the base ubuntu install doesn’t have any nvidia drivers in the default repositories).

    Other than that, this worked like a charm!

    Thanks.

  11. miesjel Says:
    November 28th, 2009 at 12:57 pm

    great tutorial. My chipset is ATI, so how would
    the “nvidia-xconfig” command look like. I tried ATI-xconfig, but of no avail

  12. Springy Says:
    November 29th, 2009 at 6:55 pm

    @Mark thanks for spotting that I have moved the instructions around.

    @miesjel you need to install the ATI drivers not the NVidia ones, if you try this guide on Ubuntu’s website:

    https://help.ubuntu.com/community/BinaryDriverHowto/ATI

    Thanks for all the good comments guys! you have inspired me to write some more blog posts and some new software for XBMC!

  13. leonmc Says:
    December 1st, 2009 at 7:36 am

    Great guide, worked like a charm. I am a complete unix newbie so can I ask one dumb question? Is the Ubuntu GUI available at all or it this setup designed to get XBMC working seamlessly (and no Gui). Thanks again.

  14. Tuan Says:
    December 2nd, 2009 at 4:31 am

    Hey, followed your instructions to the T, but I can’t seem to get it to run, I can get XBMC to run fine if I do a regular ubuntu install, but I keep getting a cannot find x server error. Is there a package that I need to select when I’m picking what to install?

  15. Springy Says:
    December 2nd, 2009 at 10:18 pm

    @leonmc the GUI is not available this is designed to be XBMC loaded only.

    @Tuan try running: apt-get install x11-common

  16. Tuan Says:
    December 3rd, 2009 at 3:22 am

    Ok, I got past that part, now I am trying to install usplash by running “sudo apt-get install usplash libusplash-dev usplash-theme-xbmc-*” but it keeps telling me that it cannot find the package, is there another repository that I need to add?

  17. Springy Says:
    December 3rd, 2009 at 1:48 pm

    @Tuan if you try using sudo apt-get install usplash libusplash-dev

    Then run sudo apt-get install usplash-theme-xbmc

    Hopefully this will install all of the themes.

  18. D0nR0sa Says:
    December 3rd, 2009 at 4:29 pm

    I have the same problem as Tuan and installing one by one also does not work. Everything else worked petrfectly except ATI drivers which took a while to get them to run.

  19. Springy Says:
    December 3rd, 2009 at 4:35 pm

    @D0nR0sa @Tuan I will take a look into the usplash problem, my machine doesn’t currently have one, but I am ready to install one now, I will see what happens and post back.

  20. D0nR0sa Says:
    December 3rd, 2009 at 4:42 pm

    Thanks, that was fast

  21. Geddyclaus Says:
    December 3rd, 2009 at 7:08 pm

    I also get : Couldn’t find package usplash-theme-xbmc-*

  22. Geddyclaus Says:
    December 3rd, 2009 at 8:13 pm

    Also with the command “sudo apt-get install xbmc-skin-*”, I get the error message: The following packages have unmet dependencies: xbmc-skin-pm3: Depends: xbmc-common (= 9.11~alpha1-karmic1) Broken packages.

  23. Clue9 Says:
    December 3rd, 2009 at 9:34 pm

    Thanks, great guide!
    Followed your tutorial and rebooted. But machine boots into bash shell not into XBMC.
    tried starting manual then i got this:

    xbmc@XBMCbuntu:~$ xbmc –standalone
    sh: glxinfo: not found
    FEH.py: cannot connect to X server
    xbmc@XBMCbuntu:~$

    Any idea what could be wrong?

  24. Clue9 Says:
    December 3rd, 2009 at 9:38 pm

    Geddyclaus Says:
    December 3rd, 2009 at 7:08 pm

    I also get : Couldn’t find package usplash-theme-xbmc-*

    I browsed this a bit, seems like usplash-theme-xbmc is moved to http://code.google.com/p/usplash-theme-xbmc/

    I a bit newb at linux so i haven’t figured out how to install from there…

  25. Tuan Says:
    December 4th, 2009 at 1:54 am

    For those having trouble with this guide try this, worked for me:

    to install XBMC run this command instead
    sudo apt-get install xbmc xinit x11-xserver-utils

    and for the Nvidia drivers run these commands:
    sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 wget dkms linux-headers-$(uname -r)
    wget http://uk.download.nvidia.com/XFree86/Linux-x86/190.42/NVIDIA-Linux-x86-190.42-pkg1.run
    sudo chmod +x NVIDIA-Linux-x86-190.42-pkg1.run
    sudo ./NVIDIA-Linux-x86-190.42-pkg1.run
    sudo nvidia-xconfig -s –no-logo –force-generate

    Then you need to install X server
    sudo apt-get install fluxbox xterm

  26. PeterW Says:
    December 4th, 2009 at 6:00 pm

    Hello,

    First, many thanks for sharing your experience.

    I wanted to get XBMC runnung on an ASRock ION 330. It all started very well, then there are a few issues:

    “sudo apt-get install xbmc-skin-*” generates an error as mentioned above “..unmet dependencies: xbmc-skin-pm3: Depends: xbmc-common..”

    “nano ~/.bash_profile” wouldn’t it be rather “nano ~/.profile” ?

    Since xbmc did not start, I tried to launch “startx” by hand and I get “cannot connect to X server”. So I issued “sudo apt-get install xinit x11-xserver-utils”

    Now X seems to start, but I got an error. So I installed everything from the previous post, build-essential, etc then run the NVIDIA script.
    Reboot, but still I get:
    “XMBC needs hardware accelerated OpenGL rendering. Install an appropriate graphics driver”
    Well, I have done that. What is missing?

  27. Tuan Says:
    December 6th, 2009 at 10:36 am

    Peter, I had the same problem as you, but I followed the Wiki to install the Nvidia drivers and after that you must install an xserver, look at my post above yours.

  28. PeterW Says:
    December 7th, 2009 at 10:37 am

    Tuan, I have noticed your “Then you need to install X server”, but I was not quite sure what to pass on to apt-get install, xorg, x11-xserver.
    I also wonder, why you have to compile teh NVIDIA modules, assuming that you can get already built ones by “sudo apt-get install nvidia-glx-190″, or do you?
    Perhaps I am going to follow and adapt http://xbmc.org/forum/showthread.php?t=38804
    peter

  29. Fabian H. Says:
    December 8th, 2009 at 5:41 pm

    Hi,
    thanks for this great guide. worked like a charm except the fact, that instad of shutting down my xbmc returns to the console … neither the xbmc.log nor the xsession-errors contain useful info regarding that. i also tried the current svn version of xbmc with the same result. any ideas why my xbmc won’t shut down?

    thx

  30. Tuan Says:
    December 10th, 2009 at 5:22 am

    PeterW, I used the Wiki instructions to install the Nvidia drivers which uses the drivers downloaded from NVidia instead of the PPAs, and to install an xserver you run the following line:

    sudo apt-get install fluxbox xterm

  31. PeterW Says:
    December 11th, 2009 at 7:47 am

    Hello Tuan,
    thanks for your comments. I see, the NVIDIA drivers from the NVIDIA site are perhaps more recent than the PPA ones.
    fluxbox is a window manager, does that mean apt-get will work out the dependency on an xserver and install it, because I did not see anywhere an apt-get install xorg or similar?

  32. Springy Says:
    December 11th, 2009 at 9:42 am

    @PeterW you shouldn’t need to install a window manager. I also don’t understand why aptitude hasn’t picked up on XBMC’s dependencies. You should just be able to run: apt-get install X11-common

  33. randomguy Says:
    December 11th, 2009 at 9:53 am

    it looks like the debs of the latest beta 2 don’t include x11 in their dependencies… this causes apt-get install xbmc to not pull those in automatically. probably should flag it to xbmc team

  34. PeterW Says:
    December 11th, 2009 at 11:18 am

    OK, I see; I was surprised that I should need a window manager as my understanding was that xbmc runs directly on the Xserver.
    So to complete Tuan’s approach, instead of installing fluxbox/xterm (which is optional), I need to sudo apt-get install X11-common before installing xbmc.

  35. someone Says:
    December 15th, 2009 at 11:58 am

    To get navigation-sounds in the menu via HDMI I had to create a file /etc/asound.conf containing:
    pcm.!default {
    type plug
    slave {
    pcm “hdmi”
    }
    }

  36. Nicola Says:
    December 18th, 2009 at 12:22 am

    Hi,
    each time i reboot… i lose all the settings.
    alsa, for example, has all the settings to high value.
    and xbmc doesn’t start automatic,,,
    any idea?

  37. PeterW Says:
    December 27th, 2009 at 6:23 pm

    Hello,
    With the help of this page and a few other inputs, I finally succeeded to instal the XBMC on my ASRock ION 330. I have compiled my experience on http://peter.wurmsdobler.org/bricols/xmbc.html in the hope it might be useful to others. The final system received a fair WAF (wife acceptance factor).
    peter

  38. Hugo Says:
    December 28th, 2009 at 9:58 pm

    As with many things it would be very helpful if you add a version history to your Guide. With that your readers will always know if suggestion and other updates have ended up in the guide. Thanks for your work

  39. Iikoo Says:
    December 29th, 2009 at 3:48 pm

    PeterW: i was having hard time opening your tutorial, until i spotted a typo in the adress. Correct adress is http://peter.wurmsdobler.org/bricols/xbmc.html.
    I am going to try it now…

  40. Christer Says:
    January 9th, 2010 at 2:53 am

    awesome work. How about IR remotes? You got a guide for that aswell? hehe. In particular the XBOX1 DVD remote, with XBOX1 DVD remote dongle.

    Keep up the awesome work!

  41. stenne Says:
    January 23rd, 2010 at 1:41 pm

    great guide!
    i hava a zotac ion itx so i guess the guide works fine for me to.
    is there any way to get a ftp server and a torrent client running in the background? or is there a plugin available that does it inside xbmc?

  42. Darkside Says:
    January 25th, 2010 at 7:34 am

    to Stenne:
    sudo apt-get install pure-ftpd

    Should do the trick and doesn’t need configuration. For torrent I don’t know.

    To Springy:
    Everything works great. Only problem I have is that I cannot install skins. I tried install -f too but doesn’t do it. Could you please look into it?

    Thanks for the great guide!

  43. Michael Griffin Says:
    January 26th, 2010 at 11:47 am

    Thanks for the information. XBMC is the best media player..Ever!

  44. PeterW Says:
    January 29th, 2010 at 9:42 am

    Hello,

    I got a bit further. First, I got my SL-6399 remote working, http://peter.wurmsdobler.org/bricols/xbmc.html.

    Second, I have still troubles with the XBMC music file view. Any file or directory names containing diacritics are not being displayed properly, e.g. the string is truncated after an occurrence of an accented character. Interestingly enough this does not happen on my Ubuntu desktop machine, only on my minimal Ubuntu machine, even though I run the same SVN build on both.

    The question for me is: What Ubuntu/Linux component does XBMC rely on that has to be installed in order to display all directories and files correctly in the file view?

    Anybody here has encountered a similar problem?

    Thanks for any help,
    peter

  45. Ravage Says:
    February 1st, 2010 at 8:10 am

    Thanks for the great guide. One question I have is that if I occasionally wanted to drop out of XBMC to run a browser, is that possible? Ideally that would work when using the “Quit XBMC” option in XBMC but for me it just boots back into XBMC. Ideas?

  46. PeterW Says:
    February 2nd, 2010 at 9:34 am

    Hello Ravage,
    Have a look at /usr/local/bin/xbmc (or /usr/bin/xbmc). Towards the end there is a loop. Perhaps you can add some code that starts a web browser when you quit xbmc, and when you quit the web browser, it would then start xbmc.
    peter

  47. Ravage Says:
    February 4th, 2010 at 11:11 pm

    Thanks for your reply Peter. Would it be simpler to just get an Gnome deskop running? My Python skills are well…0 unfortunately although I could learn. I just don’t want to mess this up too bad. I leave this machine on 24×7 and would rarely step out of XBMC but occassionally it would be nice to work on the command line or pull up a browser.
    Is this the code that starts XBMC:
    /usr/share/xbmc/xbmc.bin “$@”
    RET=$?
    Thanks again.

  48. Alex Says:
    February 21st, 2010 at 2:04 pm

    I also get : Couldn’t find package usplash-theme-xbmc-*

  49. Marc Says:
    March 4th, 2010 at 5:04 am

    I’ve been going through the tutorial and it seems to me i must have done something wrong on my mini install.

    I’m up to 1GB of space already and have not installed xbmc. Did i miss something thought this was suppose to be a minimal install.

  50. David Headrick Says:
    March 11th, 2010 at 2:19 am

    As far as the skin broken packages error, just change the command to:

    sudo apt-get install xbmc xbmc-eventclients-* xbmc-scripts-*

    This installs all the skins except the pm3 (project mayhem) skin (which is the only one with the dependency problem).

  51. David Headrick Says:
    March 15th, 2010 at 2:48 pm

    Also, I recently found I needed to add 2 more repositories to the etc/apt/sources.list to allow me to upgrade to the full 9.11 version.

    I added these lines after the 4 from the guide:

    deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main
    deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main

  52. panzaeron Says:
    March 29th, 2010 at 1:24 pm

    The usplash-theme-xbmc are found at
    http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/pool/main/u/usplash-theme-xbmc/

    Download the deb packages and install with dpkg -i

  53. Subj3ct Says:
    April 17th, 2010 at 6:06 pm

    Try XBMC Complete Installer found @ http://sourceforge.net/apps/phpbb/xci/

    It takes all this and does most for you, and then some more. It’s so easy a cave man could do it!

  54. wonslung Says:
    May 30th, 2010 at 11:17 am

    The reason some people can’t get the usplash to work is because they are installing this on ubuntu 10.4

    In lucid, usplash was replaced by plymouth

Leave a Reply