HOW-TO:Install Kodi for Linux: Difference between revisions
>Ktdreyer (rpmfusion now supports CentOS 6) |
>Nico No edit summary |
||
Line 9: | Line 9: | ||
==Ubuntu== | ==Ubuntu== | ||
'''Note:''' You find newer XBMC packages on this [http://www.loggn.de/ubuntu-xbmc-repository-11-eden-airplay-pvr-livetv/ Repository-Overview] for Ubuntu 12.04 and older. | |||
From Ubuntu 9.10 (Karmic Koala) to 11.10 (Oneiric Ocelot), you can install from the team-xbmc PPA as follows: | From Ubuntu 9.10 (Karmic Koala) to 11.10 (Oneiric Ocelot), you can install from the team-xbmc PPA as follows: | ||
Revision as of 14:07, 13 August 2012
This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions. |
- See also: XBMC for Linux specific FAQ
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.
Installation from Team XBMC distribution packages
Ubuntu
Note: You find newer XBMC packages on this Repository-Overview for Ubuntu 12.04 and older. From Ubuntu 9.10 (Karmic Koala) to 11.10 (Oneiric Ocelot), you can install from the team-xbmc PPA as follows:
sudo add-apt-repository ppa:team-xbmc sudo apt-get update sudo apt-get install xbmc sudo apt-get update sudo apt-get upgrade
Make sure to have the multiverse
repository enabled, see /etc/apt/sources.list
, it is needed for libfaad0, otherwise you get
xbmc: Depends: xbmc-data (= 2:10.00~svn35648-lucid1) but it is not going to be installed
E: Broken packages
For more details, see the HOW-TO install XBMC for Linux on Ubuntu, a Step-by-Step Guide page (The official XBMC site points to this page) or the minimal Ubuntu guide which is suitable for a HTPC style system without desktop use.
If you are interested in stable XBMC releases (releases that we certify as usable and/or testable), please use the stable PPAs. Once added in your repository list, you will be notified for any update we make. You will have the latest stable version this way.
XBMC PPAs with and without Live TV on Ubuntu 12.04 and older versions (8.04, 9.04, 9.10, 10.04, 10.10, 11.04 & 11.10)
For XBMC Dharma 10.1 or Eden 10.0 PRE with and without PVR-Support (Live-TV) on Ubuntu Hardy Heron, Jaunty Jackalope, Karmic Koala, Maverick Meerkat, Lucid Lynx, Natty Narwhal, Oneiric Ocelot & Precise Pangolin use this HowTo (English translation)
Once xbmc is configured you can then [configure it to autostart] using the command "xbmc -fs". To auto-login as the user "xbmc" with LightDM under 11.10, edit /etc/lightdm/lightdm.conf and check the SeatDefaults as below (the "user-session" setting ensures fullscreen mode will work at login):
[SeatDefaults] greeter-session=unity-greeter user-session=gnome-classic autologin-user=xbmc autologin-user-timeout=0
Installation from official distribution packages
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.
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
Foresight
xbmc is in official repositories and can be installed by running:
sudo conary update xbmc
Gentoo
xbmc is in the official portage tree as media-tv/xbmc. Install with:
sudo emerge --autounmask xbmc
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.
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.
Debian
XBMC 11.0 is in Wheezy (testing). Squeeze users should find XBMC 10.0 in the third-party distribution packages from debian-multimedia repository.
Installation from third-party distribution packages
While obviously using distribution-supplied packages is preferable (in terms of updates, continued support, easier distro upgrades etc.) to third-party packages, methods for installing from third-party packages repositories are still easier than installing from source.
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
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.
Autostarting XBMC
There's two way to start automatically XBMC:
- Modifying the inittab
- Create a new init script
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:
id:3:initdefault
to
#id:3:initdefault
and uncomment
id:5:initdefault
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.
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 ### BEGIN INIT INFO # 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 ### END INIT INFO ############### EDIT ME ################## # path to xinit exec DAEMON=/usr/bin/xinit # startup args DAEMON_OPTS=" /usr/local/bin/xbmc --standalone -- :0" # script name NAME=xbmc # app name DESC=XBMC # user RUN_AS=sterfield # Path of the PID file PID_FILE=/var/run/xbmc.pid ############### END EDIT ME ################## test -x $DAEMON || exit 0 set -e case "$1" in start) echo "Starting $DESC" start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS ;; stop) echo "Stopping $DESC" start-stop-daemon --stop --pidfile $PID_FILE ;; restart|force-reload) 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 ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac 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.
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.
- Ubuntu – XBMC-Repository-Overview - PPAs – 10.1 Dharma and 11.0 Eden – with and without PVR
- HOW-TO_GER Ubuntu 10.04 - All-in-One - Installation & Konfiguration von NVIDIA VDPAU, VDR mit VNSI-Server & XBMC PVR-TESTING2 - Hierbei handelt es sich um ein deutsches All-in-One Tutorial wie man XBMC (pvr-testing2) inkl. VDR mit dem VNSI-SERVER und LIRC zum laufen bringt.
- 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