Install XBMC for Linux

All XBMC related guides are found here.

Install XBMC for Linux

Postby brett1 » Tue Aug 06, 2013 7:26 pm

These are instructions for people who already have a Linux-based OS set up. If you have not installed a Linux-based OS yet, you might wish to try out XBMCbuntu which will install both the OS and XBMC with an easy installer.

1 Official Team XBMC repositories
1.1 Ubuntu
1.2 XBMCbuntu
2 Standard OS repositories
2.1 Arch
2.2 Foresight
2.3 Gentoo
2.4 Mageia
2.5 Mandriva
2.6 Debian
3 Third-party repositories
3.1 Ubuntu
3.2 Fedora and CentOS
3.3 openSUSE
3.4 Debian
3.5 Debian Squeeze
4 Autostarting XBMC
4.1 Upstart init script
4.2 Modify the inittab
4.3 Add a new init script
5 Installation from source

1 Official Team XBMC repositories
1.1 Ubuntu

Repositories ppa:team-xbmc/ppa ppa:team-xbmc/unstable ppa:team-xbmc/xbmc-nightly

Frodo is available from Ubuntu 11.10 (Oneiric Ocelot) to 13.04 (Raring Ringtail), you can install from the team-xbmc PPA as follows or replace the ppa with the desired from above.

sudo apt-get install python-software-properties pkg-config
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xbmc

For more details, see the HOW-TO install XBMC for Linux on Ubuntu, a Step-by-Step Guide.
1.2 XBMCbuntu
Main page: XBMCbuntu

XBMCbuntu is a boot-USB drive/LiveCD image with XBMC pre-configured to work directly out-of-the-box for a dedicated set-top-box style installation of XBMC. Users can either demo XBMC without touching the internal HDD, or use it to install XBMCbuntu on the HDD, without any pre-installed operating systems. XBMCbuntu is based on a light weight version of Ubuntu.
2 Standard OS repositories

A number of distributions now provide packages for XBMC. Since installation via distribution packages is simple (usually one or two commands) and the easiest way to get started, this section includes the minimum information on doing that. Distributions are listed in alphabetical order. Following the instructions provided should result in you having a working stand-alone XBMC installation.
2.1 Arch

As stable xbmc releases are already available through the community repository, please make sure you have it enabled in your /etc/pacman.conf. After that it's as simple as using pacman to install the most recent version of xbmc in the repository along with all of its dependencies:

pacman -Sy xbmc

2.2 Foresight

xbmc is in official repositories and can be installed by running:

sudo conary install xbmc

2.3 Gentoo

xbmc is in the official portage tree as media-tv/xbmc. Install with:

sudo emerge --autounmask xbmc

2.4 Mageia

PVR-enabled XBMC is available in the official repositories. You can install it with the graphical package manager or with the following command:

urpmi xbmc

Mageia 2 ships with XBMC 11.0 (Eden); Mageia 1 ships with XBMC 10.1 (Dharma). Both have opdenkamp's PVR support added.
2.5 Mandriva

XBMC 10.1 (Dharma) with PVR support is available in contrib/updates of Mandriva 2010.1. You can install it with

urpmi xbmc

Mandriva 2009.1 and 2010.0 have older versions of XBMC that can be installed by running:

urpmi --searchmedia Backports xbmc

Of course, you can install from contrib/backports or from contrib/release using the GUI tool rpmdrake. Note that all these methods are most easily used if you have the full software sources enabled.
2.6 Debian

The Debian repository maintainers have rejected XBMC v12's entry into their default repository (which also feeds into the default Ubuntu repositories) due to the fact that XBMC uses an internal FFmpeg, instead of system wide libav, as demanded by Debian. XBMC is unable to do this currently for various reasons, one of which is that it would take a great amount of time to switch over to that library.

See here for an alternative.
3 Third-party repositories
3.1 Ubuntu

Wsnipex - Xvba and improved Vdpau (not mainline) ppa:wsnipex/xbmc-xvba-frodo ppa:wsnipex/xbmc-xvba

Nathan Renniewaldock (contains older Ubuntu support, etc) ... bmc-stable ppa:nathan-renniewaldock/xbmc-stable ... mc-nightly ppa:nathan-renniewaldock/xbmc-nightly

3.2 Fedora and CentOS

xbmc builds for Fedora and CentOS 6 can be installed via the RPM Fusion set of repositories. Follow the RPM Fusion Configuration guide to set up the repositories and install by running:

sudo yum install xbmc

3.3 openSUSE

xbmc is available in the Packman repository. To install, add the Packman repository (YaST (package manager) --> repositories --> repositories manager --> add --> community repositories), after which you can install by running:

sudo zypper in XBMC

More information is available on the HOW TO install XBMC on openSUSE Linux page.
3.4 Debian
3.5 Debian Squeeze

Debian officially supports xbmc since Whezzy. However there are repositories which as well provide a xbmc for older debian-versions. Excellent packages of recent xbmc versions (currently 12.0, updated regularly) for debian Squeeze (stable) can be found here:

Instructions are in German but the code snippets regarding the adding of the sources should be understandable to anyone who speaks debian (or apt). Packages seem to be built from git repository and are updated at seemingly random times (probably based on the available time of the repository maintainers).

Please note: the packages in this repository depend on packages from debian-multimedia and debian backports, so you will have to add those to your sources.list as well!
4 Autostarting XBMC

There's several ways to start automatically XBMC:

Upstart script xbmc.conf in /etc/init (short and sweet)
Modifying the inittab (log winded)
Add a new init script

4.1 Upstart init script

Create a /etc/init/xbmc.conf with following contents.

# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc

description "XBMC-barebones-upstart-script"
author "Matt Filetto"

start on (filesystem and stopped udevtrigger)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit

exec su -c "xinit /usr/bin/xbmc --standalone -- -nocursor :0" $USER
end script

Note: -- -nocursor option kills all X cursor on XBMC startup and does not interfere with mouse use/operation

And your done nothing else is required, XBMC will restart/respawn if killed or crashed.
4.2 Modify the inittab

This was tested on Arch Linux.

To automatically start xbmc on your system, do the following:

First you need to make some changes to /etc/inittab. Comment out (add a #) to this line:




and uncomment


Then add this line to the bottom:

x:5:wait:login -f <YOUR_XBMC_USERNAME> </dev/tty7 &>/dev/tty7

Using wait instead of respawn means that you can exit out of xbmc into the console.

NOTE*: This is a security hole as it autologins a dedicated xbmc user without asking for a password!

Now that we have the user logged in we need it to auto start XBMC. In ~/.xinitrc add the following to the end of the file (after removing/commenting any other exec lines that start a windowmanager):

exec ck-launch-session xbmc

Add this line to your ~/.bash_profile

[[ $(tty) = "/dev/tty7" ]] && exec startx </dev/null &>/dev/null

And create a hushlogin file to suppress login messages.

touch ~/.hushlogin

Lastly, for the magic sauce that makes this work, add dbus to your daemons in /etc/rc.conf.

DAEMONS=(... dbus ...)

You're finished. Next time you reboot you should be greeted with XBMC.
4.3 Add a new init script

This method works well under Debian. The current configuration is a HTPC running Debian Squeeze, with no window manager installed. The main goal here is to start an Xserver only for XBMC. It allows also to specify which user will start / own the XBMC process. This method will not work if you have a window manager installed (however, it should not be hard to modify the script to suit your needs)

Create a new script under /etc/init.d/. Call it xbmc
Change the rights, in order to allow it to be executable.

# chmod a+x /etc/init.d/xbmc

copy the code under in the file. Modify the variables to suit your configuration:

#! /bin/sh

# Provides: xbmc
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of XBMC
# Description: starts instance of XBMC using start-stop-daemon and xinit

############### EDIT ME ##################

# path to xinit exec

# startup args
DAEMON_OPTS=" /usr/local/bin/xbmc --standalone -- :0"

# script name

# app name

# user

# Path of the PID file

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
echo "Starting $DESC"
start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
echo "Stopping $DESC"
start-stop-daemon --stop --pidfile $PID_FILE

echo "Restarting $DESC"
start-stop-daemon --stop --pidfile $PID_FILE
sleep 5
start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1

exit 0

Test the script by trying to start / stop XBMC with it.

# /etc/init.d/xbmc start
# /etc/init.d/xbmc stop

If all is ok, you can add the script to your configuration, by issuing a "update-rc.d"

# update-rc.d xbmc defaults

If XBMC does not start, you may need to allow X to start from non-consoles. Under Debian/Ubuntu, run:

# dpkg-reconfigure x11-common

and choose "Anyone".

You can now reboot the server, XBMC should be started just after the boot sequence.

5 Installation from source

If distribution packages are not available, or you need a newer version, or specific features enabled, then you will most likely need to compile from source. While compiling from source does not differ very much between distributions (except for installation of build dependencies), a few different guides are available in this wiki.

HOW-TO compile XBMC for Linux from source code
HOW-TO compile XBMC for Linux on Debian/Ubuntu - This is a tutorial on how to compile and install XBMC on Debian and Ubuntu.
HOW-TO compile XBMC for Linux on Fedora Red Hat Enterprise Linux CentOS - This is a tutorial on how to install XBMC on Fedora 8/9/10, RHEL & CentOS 5.2.
HOW-TO install XBMC for Linux on Arch Linux, a Step-by-Step Guide
VIP Member
VIP Member
Posts: 1126
Joined: Sun Jun 17, 2012 7:58 pm
Location: cornwall
National Flag:
Great Britain
Has thanked: 217 times
Been thanked: 169 times
Set up: scotle hr 6000 and Ayoue 968

Install XBMC for Linux



Return to XBMC Guides

Who is online

Users browsing this forum: No registered users and 1 guest