Archive:HOW-TO:Install XBMC on Ubuntu/HOW-TO 3: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Blittan
(used <pre> on deb lines)
>Blittan
(changed deb keys, one missing)
Line 49: Line 49:
then import the TeamXBMC key:
then import the TeamXBMC key:


<xml>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x6D975C4791E7EE5E
<xml>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 91E7EE5E 318C7509
</xml>
</xml>



Revision as of 18:52, 28 July 2009

Template:GoToParent

Introduction

Most of XBMC users are aware that XBMC Live is being released regularly by TeamXBMC, allowing a set-top box experience both running from a CD, a flash disk or fixed disk drive.

XBMC Live is a streamlined Ubuntu-based system, optimised for removable media, that once installed on a fixed disk drive is a pure ubuntu-based system, although customized for set-top box experience.

  • Note: such a system will be exactly like the one that this procedure will generate, except that no build environment will be available by default (you will need to apply the last two steps only if interested).

However, more and more XBMC users are urging to build their own customized systems for their media centers, adding support for specific hardware or providing additional functionalities.


This guide describes how to build an Ubuntu-based system with the minimal set of features that are part of XBMC Live, from which an expert user could start to create his/her perfect setup. Internet access is required during the installation. All the following screens and instructions are related to Ubuntu Jaunty.


This guide is not destined to Linux neophytes, since some knowledge of the Linux/Unix systems is needed to perform some steps. For a simpler approach pls follow the procedure describe here.

Install miminal Ubuntu

The Ubuntu community provides a handy "Minimal CD image", a tiny bootable CD (<10 MB) to be used to perform a custom installation with a text-based installer. Get the most recent Janty ISO image from here.


Select "Install" at boot prompt, then when prompted provide info about your location, language, keyboard layout, time zone. Disk partitioning will be basic, the full disk will be deleted and used.

  • Note: If you want more control on the install options you can opt for the "Expert install" at boot prompt, that provides you more flexible disk selection and partitioning options.


When prompted, create an username for your account. Note that XBMC will run on its own account "xbmc" that will be created later in the install process.


During the installation select "Base Ubuntu server" as the only option, or optionally "OpenSSH server" if you want to have (secure) remote connections facilities.

BasicUbuntu.jpg


The installer will then download all the required packages and finally the system will reboot.

From now on you can ssh from a computer to simplify the rest of the install.

Initial system configuration

Create the file /etc/apt/sources.list.d/xbmc.org.list with the following content:

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

then import the TeamXBMC key:

<xml>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 91E7EE5E 318C7509 </xml>

and then

<xml>sudo apt-get update </xml>

Install custom boot splash (optional)

If you want to replace the standard Ubuntu boot screen with a custom, XBMC related one TeamXBMC provides the following in its repository:

  • usplash-theme-xbmc-pulsating-logo XBMC Usplash theme for Ubuntu (Pulsating Logo edition)
  • usplash-theme-xbmc-spinner-black XBMC Usplash theme for Ubuntu (Black edition)
  • usplash-theme-xbmc-spinner-blue XBMC Usplash theme for Ubuntu (Blue edition)


All of them are courtesy of user Duduke, see his blog for information and screenshots.

First you need to edit /etc/usplash.conf to look like this (or the resolution you want)

# Usplash configuration file
xres=1366
yres=720

To install the pulsating logo, as an example, type the following:

<xml>sudo apt-get install usplash-theme-xbmc-* sudo update-alternatives --config usplash-artwork.so sudo update-initramfs -u </xml>

Install XBMC

The core XBMC application and its related dependencies can be installed by typing:

<xml>sudo apt-get install xbmc xinit x11-xserver-utils </xml> This will take a considerable amount of time since lots of packages are due to be installed.

Install "restricted drivers" for NVIDIA or ATI/AMD video cards (optional)

XBMC requires a 3D GPU (Graphics Processing Unit) that at least supports Shader Model 3.0 and OpenGL 2.0 (that features 24bpp or 32bpp for 3D hardware-acceleration support). As of writing, only Intel, ATI/AMD and NVIDIA have compatible products. However, while Intel drivers are included by default in the standard Ubuntu kernel, NVIDIA and ATI/AMD are not and require additional steps for installation.


If using NVIDIA: install NVIDIA restricted drivers

Method 1: use third-party reporitories

This is not the recommended method since it relies on binaries built by non-certified third parties, but it is very convenient for those with limited Linux skills.

You can find plenty of instructions around by searching for "avenard" or "thefirstm".

Method 2: use the binary driver installer for NVIDIA

Install a proper kernel module build environment:

<xml>sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r) </xml>


Download the latest installer from NVIDIA website using wget:

<xml>sudo apt-get install wget </xml>

example: <xml>wget http://us.download.nvidia.com/XFree86/Linux-x86/180.51/NVIDIA-Linux-x86-180.51-pkg1.run </xml>

Make it executable:

<xml>sudo chmod +x NVIDIA-Linux-x86-180.51-pkg1.run</xml>

and run it:

<xml>sudo ./NVIDIA-Linux-x86-180.51-pkg1.run</xml>

The installer should take care of installing drivers, libraries and building the proprietary kernel module (via dkpg).


In both ways, you need a proper xorg.conf file; you can generate a new one automatically by using:

<xml>sudo nvidia-xconfig -s --no-logo --force-generate</xml>

If using ATI/AMD; install ATI/AMD restricted drivers

Follow one of the two methods described in the "Unofficial ATI Linux Driver wiki". Manual install is very likely to give the best results, but YMMV.

Test basic installation of XBMC

At this stage you should have a fully configured standard minimal Ubuntu setup. The system boots to console logon, and XBMC does not start automatically. You may want to test if all the above steps were successful by starting a graphical X session and run XBMC manually. For this you need a window manager, the most simple and compact being fluxbox or blackbox:

<xml>sudo apt-get install fluxbox xterm</xml>

or

<xml>sudo apt-get install blackbox xterm</xml>

and then

<xml>startx</xml>

Start an xterm with the default fluxbox menu and type "xbmc" on the xterm. If XBMC opens you are good to proceed, otherwhise something could have been gone wrong.

Install xbmc helpers

Once a basic standard system is fully working you can start customizing the startup sequence in order to achieve the set-top box experience that is desired for a real media center.

A package has been prepared for that in TeamXBMC repository, install it with

<xml>sudo apt-get install xbmc-live python-apt</xml>


Finally, there is a manual modification to be applied to the file /boot/grub/menu.lst: you have to add

<xml>xbmc=nodiskmount,noredir loglevel=0</xml>

to the default kernel cmdline (entry 0).


If you want to have a "SAFE MODE" option (boot to console prompt without XBMC starting automatically), copy all the lines of the default block (lines starting with title, uuid, kernel, initrd, quit) and create a new one, modifying the title and removing "quiet splash" from the kernel parameters. As an example the original entries for Jaunty are:

<xml>

title		Ubuntu 9.04, kernel 2.6.28-11-generic
uuid		b2730ec6-2352-49b0-a7c5-69f947380fac
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=b2730ec6-2352-49b0-a7c5-69f947380fac ro splash quiet xbmc=noredir,nodiskmount loglevel=0
initrd		/boot/initrd.img-2.6.28-11-generic
quiet
#
title		Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid		b2730ec6-2352-49b0-a7c5-69f947380fac
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=b2730ec6-2352-49b0-a7c5-69f947380fac ro  single
initrd		/boot/initrd.img-2.6.28-11-generic
#
title		Ubuntu 9.04, memtest86+
uuid		b2730ec6-2352-49b0-a7c5-69f947380fac
kernel		/boot/memtest86+.bin
quiet

</xml> and you can create a SAFE MODE entry like this:

<xml>

title		Ubuntu 9.04, kernel 2.6.28-11-generic (SAFE MODE)
uuid		b2730ec6-2352-49b0-a7c5-69f947380fac
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=b2730ec6-2352-49b0-a7c5-69f947380fac ro xbmc=noredir,nodiskmount loglevel=0
initrd		/boot/initrd.img-2.6.28-11-generic
quiet

</xml>

Updating alsa

There are a few issues with the current alsa package shipped with Ubuntu, therefor it might be a good idea to upgrade.

<xml>sudo apt-get install wget wget http://xbmc.org/wp-content/uploads/alsaup.sh chmod +x alsaup.sh sudo ./alsaup.sh -di</xml>

This should download and update your alsa to the latest version (1.0.20 when writing this)

Reboot the computer and check that alsa is updated, start alsamixer and look in the caption, the version should show there.

Credits for the script: soundcheck on Ubuntu forums

Additional settings and packages

By default the sound card will have several channels moted, others with low volumes. You have to find your setup by running

<xml>alsamixer</xml>

and adjust the channels you are interested in. Once done, save the sound volumes permanently with

<xml>sudo alsactl store</xml>

Optional: Install support for a remote

If you prefer to navigate in XBMC with a remote check if your remote is supported by "lirc" on their website, and if it is you can install and configure it with

<xml>sudo apt-get install lirc</xml>

Optional: Install build environment

If not already installed in previous steps, you may want to have a build environment in your system in order to allow the compilation of both custom applications and updated version of kernel modules and packages that are not available in Ubuntu repositories.

The basic packages needed are installed by the following command:

<xml>sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r)</xml>

Optional: Install XBMC build environment and SVN tools

If you want to walk on the bleeding edge and follow daily development of XBMC you have to install subversion and all XBMC build dependencies:

<xml>sudo apt-get install subversion sudo apt-get build-dep xbmc </xml>