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

From Official Kodi Wiki
Jump to navigation Jump to search
>Olympia
No edit summary
 
(313 intermediate revisions by 34 users not shown)
Line 1: Line 1:
== Introduction ==
{{outdated}}
The following is the recommended way of installing XBMC as a standalone app for Ubuntu. This is not the most stripped down approach but it is the safest and most simplistic. Please also consider XBMC Live as an easy way to try XBMC without changing your system. For a more stripped down approach, consider the more advanced guide XBMCbuntu which starts with a minimal server install.


<xml>
This guide assumes that desktop based Ubuntu (Gnome, KDE, XFCE) is installed and working and that your system meets the minimum requirements for XBMC. If you're having trouble getting to this point please visit [http://ubuntuforum.org Ubuntu Forums] for help.
req = urllib2.Request(url)
req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
</xml>


After my XBMC Live guide, I decided to put together a guide for installing XBMC on Ubuntu Intrepid Minimal CD version as well.
[http://www.loggn.de/ubuntu-xbmc-repository-10-1-dharma-und-11-0-eden-mit-und-ohne-pvr/ XBMC-Repository-Overview] for 8.04, 9.04, 9.10, 10.04, 10.10, 11.04, 11.10 & 12.04 with PVR (Live-TV) and without PVR-Support


Please note:
== Installing XBMC Ubuntu 9.10 Karmic or higher ==
* I only tested this with nvidia, so I have no experience with ATI
'''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.
* The guide is for using XBMC on a dedicated HTPC, so there is not any window manager installed
* You need minimum 4GB size flash drive or hard disk to go


This guide walks you through how to install every needed components and XBMC itself, but try to leave to footprint as small as it can.
If you are using Ubuntu 9.10 or higher, you have the option of a more streamlined install. Load the terminal window and issue the following:


You will get:
<source lang="bash">
* A dedicated HTPC autoboot to XBMC
sudo apt-get install python-software-properties pkg-config
* Latest XBMC SVN version
sudo add-apt-repository ppa:team-xbmc
* Upgraded ALSA driver
sudo apt-get update
* Upgraded NVIDIA driver
sudo apt-get install xbmc xbmc-standalone
* Lirc (I have MS MCE Remote which works out of the box, so everybody with other remotes and LCD displays are in his/ her own to solve the individual Lirc issues)
sudo apt-get update
* Suspend/ resume (works perfectly on ASUS P5N7A-VM)
</source>


So, let’s start:
You do not need to add the XBMC Repo nor the PPA Keys. XBMC is already installed. To have content, go to Adding the XBMC SVN Repo Installer (not to be confused with XBMC Repo below).


== Preparation ==
If you get an error message like <code>xbmc: Depends: xbmc-data (= 2:10.00~svn35648-lucid1) but it is not going to be installed E: Broken packages</code> while doing this, please enable <code>multiverse</code> and <code>multiverse</code> repositores in <code>/etc/apt/sources.list</code>, or go to the System menu, then Administration, then Software Sources and check the "Community-maintained open Source software (universe)" and "Software restricted by copyright or legal issues (multiverse)" checkboxes and apply the changes.


FIRST STEP
For NVidia hardware acceleration (VDPAU) in Ubuntu 10.04 install the following packages:
Download, burn and install Ubuntu Intrepid mini.iso from here:
<source lang="bash">
https://help.ubuntu.com/community/In...tion/MinimalCD
sudo apt-get install libvdpau1 nvidia-185-libvdpau
</source>


Apparently there seems to be an issue with Intrepid installer. If you are using flash drive, it's not installing GRUB for some reason.
== Adding the XBMC Repo ==
Adding the XBMC Repo tells your system where to look for xbmc for installation and future updates
* From the Desktop, click System -> Administration -> Software Sources.
* Click the "Third Party Software" tab.
* Click "Add" for each of the following. For the Apt line type the following, substituting "jaunty" for your version:
<pre>deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main</pre>
* Click "Close". If you see a GPG Error upon closing the window, not to worry. That will be handled in the next step.


You have to options:
== Adding PPA Keys ==
Either install Hardy(Ubuntu 8.04) mini.iso first, which is install GRUB, then right after that, install Intrepid mini.iso over the same flash drive. It will reformat the drive, but GRUB will stay alive on the drive.
These packages are signed with a unique key for added security. Synaptic needs to know this key in order to verify the packages' authenticity.
* Click [http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x6D975C4791E7EE5E here] to view the PGP key
* Select the text from the beginning of the keyblock to the end (including those lines)
* Copy that text to the clipboard (Edit -> Copy)
* Open your text editor from Applications -> Text Editor.
* Paste the key contents (Edit -> Paste)
* Save the document in your home folder as xbmc-ppa.key
* Reopen Software Sources, this time choosing the "Authentication" tab.
* Click "Import Key File" and choose the newly created xbmc-ppa.key and press OK.


Second option is that right after Intrepid mini installation, boot up Intrepid mini.iso from the CD again, choose rescue mode, and there you will find an "install GRUB" option.
''You can also combine all these steps into a single command-line command:
<source lang="bash">sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x6d975c4791e7ee5e</source>


== Installing XBMC ==
Now that the repo and key have been added, install XBMC like any other program.
* Click System -> Administration -> Synaptic Package Manager
* Click "Reload"
* Search for "xbmc"
* Mark xbmc and xbmc-standalone for installation and mark additional changes when prompted.
* Click "Apply" and agree to the changes after reading them.
XBMC is now installed and ready for use.
== Adding the XBMC SVN Repo Installer ==
In Ubuntu the SVN Repositories are not automatically added. You must add them manually.
* First, download the SVN Repo Installer from:
* http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
* Extract it to the ~/.xbmc/plugins/programs directory. If this directory does not exist, run XBMC one time and then exit back to Ubuntu. The directory should now exist.
* Select XBMC Media Center: Applications -> Sound & Video -> XBMC Media Center
* Scroll down to Programs.
* Select program plugins.
* Select SVN Repo Installer
* Select xbmc-addons
* Select plugins
* Choose the plugins that you want to add (i.e., videos)
== Autostart XBMC (optional) ==
By following these instructions, your system will boot directly into XBMC rather than your desktop from now on. '''It is advised that you delay this step until XBMC is setup as you'd like it.
* From the desktop click System -> Administration -> Login Screen
* From the "Security" tab choose "Enable Automatic Login" and select your username.
* Click "OK" to exit.
* Logout of your system.
* From the Login screen choose "Select Session"
* Choose "XBMC" and click "Change Session"
You're finished. Next time you login you should be greeted with XBMC.


During the installation, please set „xbmc” as username and password at the account creation.
== Autostart XBMC (optional alternative) ==
* From the desktop click System -> Administration -> Login Screen
* From the "Security" tab choose "Enable Automatic Login" and select your username.
* Click "OK" to exit.
* From the desktop click System -> Preferences -> Startup Applications
* Click "Add"
* Name: XBMC
* Command: xbmc
* Comment: XBMC
* Click "OK"
You're DONE, Ubuntu will now load gnome first then xbmc straight after, slightly slower but it keeps your gnome session available.


At the end, when you have to choose from the optional components, check only „OpenSSH” to be able to access your HTPC remotely via SSH.
'''NOTE:''' It is important to use all lower case characters when entering the command.
 
== Weblinks ==
After you’re done, boot it up, then use an SSH application (e.g. putty) to log in remotely from your desktop, using the above created username and password. This way, you will be able to copy/ paste all the steps below. Alternatively you can use your console, but then you will have a hard time type in everything.
* [http://www.loggn.de/ubuntu-xbmc-repository-10-1-dharma-und-11-0-eden-mit-und-ohne-pvr/ HOW-TO: Ubuntu – XBMC-Repository-Overview – 10.1 Dharma und 11.0 Eden – with and without PVR] - XBMC-Repository for 8.04, 9.04, 9.10, 10.04, 10.10, 11.04, 11.10 & 12.04
 
* [http://www.loggn.de/all-in-one-howto-ubuntu-10-04-installation-konfiguration-von-nvidia-vdpau-vdr-mit-vnsi-server-xbmc-pvr-testing2/ HOW-TO: HowTo – Ubuntu 10.04 – 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.
So once you logged in:
 
First of all, update the repos, and install all prerequisites:
 
NEXT STEP
Code:
 
#sudo apt-get update
 
NEXT STEP
Code:
 
#sudo apt-get install –y subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi-dev liblzo-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl4-gnutls-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libtre-dev libogg-dev libvorbis-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev wget build-essential linux-headers-`uname -r` xorg pm-utils mingetty
 
Please note, that as this is a guide for dedicated HTPC and in this case we mostly need passthrough, I choose NOT to install the libs for Pulseaudio and compile XBMC later without Pulseaudio support. As far I understand, only ALSA is needed in this case.
 
== To upgrade ALSA ==
 
I have modified the ALSA upgrade script (available at Ubuntuforums), and now it is working with only “-di” option in our case here (Also on ASUS P5N7A-VM).
 
To download and use:
 
NEXT STEP
Code:
 
#wget http://217.20.138.65/AlsaUpgrade-1.0.x-rev-1.15-Ben.sh
 
NEXT STEP
Code:
 
#chmod 777 AlsaUpgrade-1.0.x-rev-1.15-Ben.sh
 
NEXT STEP
Code:
 
#sudo ./AlsaUpgrade-1.0.x-rev-1.15-Ben.sh -di
 
This mini version of Intrepid has a bug (or maybe a feature), that the user created at installation is not added to the „audio” group. We need the correct this:
 
NEXT STEP
Code:
 
#sudo usermod -a -G audio xbmc
 
or replace „xbmc” with username you installed with
 
reboot the computer:
 
NEXT STEP
Code:
 
#sudo reboot
 
For some reason, the driver snapshot for ALSA 1.0.19 is not always downloading properly; in this case you have to run the script again. To check whether the driver upgraded or not:
 
NEXT STEP
Code:
 
#more /proc/asound/version
 
If you see driver version 1.0.19 here, you can continue, but if there is 1.0.17 as driver version, then you have to repeat the last 3 step (upgrade, reboot, check).
 
If it’s OK, then you can delete the just downloaded ALSA source to free up some disk space:
 
NEXT STEP
Code:
 
#sudo rm -r /usr/src/Alsa-1.0.19/
 
Now run alsamixer:
NEXT STEP
Code:
 
#alsamixer
 
Navigate right with cursor keys until IEC958 and unmute all three of them (IEC958) with „M” key. You should see in case of all three IEC958 a „00” in green background. Press „ESC” to quit from alsamixer.
 
Now, you have to edit the following file, using nano for example:
 
NEXT STEP
Code:
 
#sudo nano /etc/modprobe.d/alsa-base
 
and add this line to the end:
 
Code:
 
options snd-hda-intel model=6stack-dig
 
== To update NVIDIA driver ==
 
NEXT STEP
Code:
 
#wget http://us.download.nvidia.com/XFree86/Linux-x86/180.22/NVIDIA-Linux-x86-180.22-pkg1.run
 
NEXT STEP
Code:
 
#sudo sh NVIDIA-Linux-x86-180.22-pkg1.run
 
In the nvidia installer: accept the License agreement, choose „YES” for „No precompiled kernel interface...”, choose „OK” for „No matching precompiled kernel interface...”, than choose „YES” to update X configuration file, than finally „OK” again at the end.
 
Now you can delete NVIDIA installer
 
NEXT STEP
Code:
 
#rm NVIDIA-Linux-x86-180.22-pkg1.run
 
== To install XBMC (latest SVN) ==
 
NEXT STEP
Code:
 
#svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC
 
Wait for downloading XBMC source files, might takes long time, depend on your Internet connection. After it downloaded:
 
NEXT STEP
Code:
 
#cd XBMC
 
OPTIONAL STEP
If you experience problems with Intrepid ffmpeg performance (most probably you will) which is under discussion here: http://forum.xbmc.org/showthread.php?t=43075, you may want to try aron's patch (thank you aron, for this).
 
Please be aware, that this is not supported and not recommended by team-XBMC. If you don't want to install this patch, just skip all the optional steps and jump to the closest "NEXT STEP".
 
OPTIONAL STEP2
Code:
 
#wget http://trac.xbmc.org/raw-attachment/ticket/5680/xbmc_ffmpeg_mt.patch
 
OPTIONAL STEP3
Code:
 
#patch -p0 < xbmc_ffmpeg_mt.patch
 
Then configure/compile/install XBMC:
 
NEXT STEP
Code:
 
#./configure --prefix=/usr --disable-pulse
 
NEXT STEP
Code:
 
#make -j2
 
(NOTE: use only „make”, if you don’t have a dualcore CPU)
This is again, can take a a while, depend on your CPU speed.
 
NEXT STEP
Code:
 
#sudo make install
 
== To autoboot and autostart XBMC ==
 
NEXT STEP
Code:
 
#cd ..
 
Or "cd $home"
 
NEXT STEP
Code:
 
#wget http://217.20.138.65/.xsession
 
NEXT STEP
Code:
 
#sudo nano /etc/event.d/tty2
 
In here comment out the last line (with #) and add the following line. The end of the file should look like this:
 
Code:
 
respawn
#exec /sbin/getty 38400 tty2
exec /sbin/mingetty --autologin xbmc tty2
 
Or replace "xbmc" with the username you installed Ubuntu Mini.
 
NEXT STEP
Code:
 
#sudo nano .bash_profile
 
Copy the following text, then save the file:
 
Code:
 
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty2 ]; then
 
startx -- -br
 
fi
 
== To install Lirc ==
 
NEXT STEP
Code:
 
#sudo apt-get install –y lirc
 
And follow the wizard.
 
== Power Management ==
 
To be able to control power management (suspend, shutdown, reboot) from within XBMC, you have to change PolicyKit.conf
 
NEXT STEP
Code:
 
#sudo wget -P/etc/PolicyKit http://217.20.138.65/PolicyKit.conf
 
If you wish to enable CPU scaling feature:
 
First of all, don’t forget to enable it in the BIOS.
 
Code:
 
#sudo apt-get powernowd
 
== Configure xorg.conf for proper modes to benefit from auto refresh ==
 
This is not an easy part and can differ from display to display.
For myself, I include 3 custom modelines to my xorg.conf for my FullHD plazma screen.
 
If you have a FullHD display, and want to play with my xorg.conf you can replace your xorg.conf with mine:
 
NEXT STEP
Code:
 
#sudo cp /etc/X11.xorg.conf /etc/X11.xorg.conf.backup
 
NEXT STEP
Code:
 
#sudo wget -P/etc/X11 http://217.20.138.65/xorg.conf
 
== Sound configuration in XBMC ==
 
After booted into XBMC switch to „digital” audio output, than choose the AC3 and DTS capabilities according to your receiver.
For SPDIF: leave audio output device: default and passthrough on IEC958
For HDMI: change both audio output device and passthrough to hdmi (you will loose analog sound eg. navigation sound in case of hdmi)

Latest revision as of 22:11, 17 June 2020

Time.png THIS PAGE IS OUTDATED:

This page or section has not been updated in a long time, no longer applies, refers to features that have been replaced/removed, and/or may not be reliable.

This page is only kept for historical reasons, or in case someone wants to try updating it.

The following is the recommended way of installing XBMC as a standalone app for Ubuntu. This is not the most stripped down approach but it is the safest and most simplistic. Please also consider XBMC Live as an easy way to try XBMC without changing your system. For a more stripped down approach, consider the more advanced guide XBMCbuntu which starts with a minimal server install.

This guide assumes that desktop based Ubuntu (Gnome, KDE, XFCE) is installed and working and that your system meets the minimum requirements for XBMC. If you're having trouble getting to this point please visit Ubuntu Forums for help.

XBMC-Repository-Overview for 8.04, 9.04, 9.10, 10.04, 10.10, 11.04, 11.10 & 12.04 with PVR (Live-TV) and without PVR-Support

Installing XBMC Ubuntu 9.10 Karmic or higher

Note: You find newer XBMC packages on this Repository-Overview for Ubuntu 12.04 and older.

If you are using Ubuntu 9.10 or higher, you have the option of a more streamlined install. Load the terminal window and issue the following:

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

You do not need to add the XBMC Repo nor the PPA Keys. XBMC is already installed. To have content, go to Adding the XBMC SVN Repo Installer (not to be confused with XBMC Repo below).

If you get an error message like xbmc: Depends: xbmc-data (= 2:10.00~svn35648-lucid1) but it is not going to be installed E: Broken packages while doing this, please enable multiverse and multiverse repositores in /etc/apt/sources.list, or go to the System menu, then Administration, then Software Sources and check the "Community-maintained open Source software (universe)" and "Software restricted by copyright or legal issues (multiverse)" checkboxes and apply the changes.

For NVidia hardware acceleration (VDPAU) in Ubuntu 10.04 install the following packages:

sudo apt-get install libvdpau1 nvidia-185-libvdpau

Adding the XBMC Repo

Adding the XBMC Repo tells your system where to look for xbmc for installation and future updates

  • From the Desktop, click System -> Administration -> Software Sources.
  • Click the "Third Party Software" tab.
  • Click "Add" for each of the following. For the Apt line type the following, substituting "jaunty" for your version:
deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main
  • Click "Close". If you see a GPG Error upon closing the window, not to worry. That will be handled in the next step.

Adding PPA Keys

These packages are signed with a unique key for added security. Synaptic needs to know this key in order to verify the packages' authenticity.

  • Click here to view the PGP key
  • Select the text from the beginning of the keyblock to the end (including those lines)
  • Copy that text to the clipboard (Edit -> Copy)
  • Open your text editor from Applications -> Text Editor.
  • Paste the key contents (Edit -> Paste)
  • Save the document in your home folder as xbmc-ppa.key
  • Reopen Software Sources, this time choosing the "Authentication" tab.
  • Click "Import Key File" and choose the newly created xbmc-ppa.key and press OK.

You can also combine all these steps into a single command-line command:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x6d975c4791e7ee5e

Installing XBMC

Now that the repo and key have been added, install XBMC like any other program.

  • Click System -> Administration -> Synaptic Package Manager
  • Click "Reload"
  • Search for "xbmc"
  • Mark xbmc and xbmc-standalone for installation and mark additional changes when prompted.
  • Click "Apply" and agree to the changes after reading them.

XBMC is now installed and ready for use.

Adding the XBMC SVN Repo Installer

In Ubuntu the SVN Repositories are not automatically added. You must add them manually.

  • First, download the SVN Repo Installer from:
  • http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
  • Extract it to the ~/.xbmc/plugins/programs directory. If this directory does not exist, run XBMC one time and then exit back to Ubuntu. The directory should now exist.
  • Select XBMC Media Center: Applications -> Sound & Video -> XBMC Media Center
  • Scroll down to Programs.
  • Select program plugins.
  • Select SVN Repo Installer
  • Select xbmc-addons
  • Select plugins
  • Choose the plugins that you want to add (i.e., videos)

Autostart XBMC (optional)

By following these instructions, your system will boot directly into XBMC rather than your desktop from now on. It is advised that you delay this step until XBMC is setup as you'd like it.

  • From the desktop click System -> Administration -> Login Screen
  • From the "Security" tab choose "Enable Automatic Login" and select your username.
  • Click "OK" to exit.
  • Logout of your system.
  • From the Login screen choose "Select Session"
  • Choose "XBMC" and click "Change Session"

You're finished. Next time you login you should be greeted with XBMC.

Autostart XBMC (optional alternative)

  • From the desktop click System -> Administration -> Login Screen
  • From the "Security" tab choose "Enable Automatic Login" and select your username.
  • Click "OK" to exit.
  • From the desktop click System -> Preferences -> Startup Applications
  • Click "Add"
  • Name: XBMC
  • Command: xbmc
  • Comment: XBMC
  • Click "OK"

You're DONE, Ubuntu will now load gnome first then xbmc straight after, slightly slower but it keeps your gnome session available.

NOTE: It is important to use all lower case characters when entering the command.

Weblinks