HOW-TO:Compile XBMC for Linux
- Note: This is an initial Linux port. It does not yet include all the features of XBMC. Don't expect too much. For more information read the XBMC for Linux port project article in this wiki.
- Note: XBMC is open source (GPL) software and as so the source code is available for anyone to modify and/or compile (under the rules of the GPL).
- Supported Linux Operating-System installed on a supported computer, currently the officially supported OS are:
- Ubuntu Desktop Edition 8.04 (Hardy Heron) 32-bit for x86
- Ubuntu Desktop Edition 8.10 (Intrepid Ibex) 32-bit for x86
- Ubuntu Desktop Edition 9.04 (Jaunty Jackalope) 32-bit for x86
- Ubuntu Server Edition 8.04 (Hardy Heron) 32-bit for x86
- Ubuntu Server Edition 8.10 (Intrepid Ibex) 32-bit for x86
- Ubuntu Server Edition 9.04 (Jaunty Jackalope) 32-bit for x86
- Ubuntu Mobile and Embedded Edition 8.04 (UME) 32-bit for x86
- Ubuntu Mobile and Embedded Edition 8.10 (UME) 32-bit for x86
- Ubuntu Mobile and Embedded Edition 9.04 (UME) 32-bit for x86
- Note that it is also possible to compile and run 32-bit XBMC under 64-bit (AMD64/EMT64) Ubuntu if you run it in a 32bit chroot.
- Other working distributions (but officially unsupported) are:
- x86-based computer. No other special hardware is required for development, as developers can compile using the "make sdl_2d option" (see ). However for end-users the minimum requirement is 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, which XBMC GUI need to run smootly at an acceptable frame-rate). Graphic adapters that support DirectX version 9.0c or later usually meet all of those mentioned requirements, (Team-XBMC recommends NVIDIA GeForce 6150 or later as NVIDIA are currently the manufacturer that offers good device-drivers for Linux (and NVIDIA GeForce 6150 or later supports OpenGL 2.0).
- Correctly installed graphics device-drivers which supports 24bpp or 32bpp for 3D hardware-acceleration, (Team-XBMC recommends that you run Envy which is a application that automaticly downloads and installs the correct proprietary device-driver for your ATI or NVIDIA graphic chip).
2 Getting the source code
For the first time:
$ sudo apt-get install subversion $ cd $HOME $ svn checkout http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk
In order to update the source code (and clean old make files):
$ cd $HOME/XBMC $ svn up $ make clean
3 Installing required Ubuntu packages
The current list of required packages for each supported version is located in the README.linux file in the SVN
Use a single command to get all build dependencies
For this, you need to specify the PPA in your apt sources. Please find them on the forum.
Update apt :
$ sudo apt-get update
Here is the magic command to get the build dependencies (used to compile the version on the PPA).
$ sudo apt-get build-dep xbmc
4 How to compile
4.1 Default compile and install
Requires 3D GPU that has supported OpenGL 3D hardware acceleration, set bitdepth to 24bpp or 32bpp
$ cd $HOME/XBMC $ ./bootstrap $ ./configure $ make $ sudo make install
4.2 ./configure command line switches
These switches are possible when running configure:
- Install XBMC to /path rather than default (/usr/local)
- Much much slower GUI rendering but works on all adapters and bitdepths. For development purposes only.
- No debug information (smaller executable, no FreeMem text in screens)
- open issue: FreeMem is still shown even with --disable-debug
It is also possible to combine these options, for example:
$ ./configure --disable-debug --disable-gl
4.3 Quicker compilation
By adding -j<number> to the make command, you describe how many cores will be used. So for dualcore the commands are:
$ make -j2
$ make -j2 sdl_2d
Exprimental: You could add distcc if you have more than one computer networked. This will run make on several computers sharing the workload between them.
5 How to run
Everything is now taken care of by the install script. Simply run the xbmc command from anywhere:
Toggle FS with \ key while XBMC is running.
7 Multi-monitor Fullscreen
If you have a multi-monitor setup and you want to use fullscreen, make sure to set the env variable SDL_VIDEO_FULLSCREEN_HEAD to the display no. which you want SDL to use for the fullscreen mode.
For e.g. "SDL_VIDEO_FULLSCREEN_HEAD=1 ./xbmc.bin -fs" to tell SDL to use display no.1