Archive:Google Summer of Code/2008 and Archive:HOW-TO:Install XBMC on Ubuntu/HOW-TO 1: Difference between pages

From Official Kodi Wiki
(Difference between pages)
Jump to navigation Jump to search
>Gamester17
 
>D4rk
 
Line 1: Line 1:
'''XBMC has been accepted into the Google Summer of Code 2008!'''
The purpose of this guide is to give a hand to new XBMC users, who want to build a Linux based, dedicated [http://en.wikipedia.org/wiki/Home_theater_PC HTPC (Home Theater PC)], a true living-room media center computer, but don't have any knowledge and experience in the Linux world.
{{Current event}}
Google is sponsoring their fourth annual [http://code.google.com/soc/ Summer of Code (GSoC)] in the summer of 2008, this entail sponsoring students to work on assorted open source projects as well as sponsoring mentors in those same projects, everyone wins! XBMC has been selected as one of the approved mentoring organizations for this year's GSoC. This page will be used for possible project ideas for the [http://code.google.com/soc/2008 Google Summer of Code 2008 season], and also track the status of each project and how well each student is doing.


The administrator for this year's XBMC Summer of Code is [[User:Gamester17|Andreas Setterlind (a.k.a. Gamester17)]]
You always have the chance to try [[XBMC Live]] to test/demo XBMC Media Center, but if you want to have more control and more customization possibilities, than a Linux installation like in this guide is more suitable.


:NOTE! '''If you are a student''' who wishes to be '''involved with an XBMC GSoC project''', one of the first and best steps you can take is to register an account on [http://forum.xbmc.org XBMC community forum], (sooner rather than later), and indicate your interest. Also, make sure that you '''complete''' a qualification task as soon as possible to be eligible for a XBMC SoC project, (no qualification task = no project, that is Team-XBMC policy, not Google).
= Introduction =
This is a real step-by-step guide, I hope everybody can follow and walk through the whole installation procedure. The guide is based on either Ubuntu 8.04 (Hardy Heron) or 8.10 (Intrepid Ibex) as a platform, start with a minimal install and only install the needed components at the top of that.


==Introduction to XBMC==
On the face of it, maybe seems very lengthy process, but you will feel shorter while you follow it.
XBMC (formerly "XBox Media Center") is a free and open source (GPL) cross-platform media player and entertainment hub software. XBMC was originally established in 2002 and in the beginning developed as XBox Media Player (XBMP) for the first-generation Xbox game-console. XBMC has since been ported to also run natively under Linux, Mac OS X, and Microsoft Windows operating-system. XBMC has so far been translated to over 30 languages, won two SourceForge Community Choice Awards, (Best Multimedia Project and Best Game Project back in 2006), and today XBMC has a very broad international community of active developers, graphic artists, and devoted users.


*'''[[HOW-TO compile XBMC for Linux from source code|XBMC for Linux]]''' (see the [[XBMC for Linux port project]] for more information)
'''Please note:'''
*'''[[HOW-TO compile XBMC for Mac OS X from source code|XBMC for Mac OS X]]''' (see the [[XBMC for Mac OS X port project]] for more information)
* The guide is for using XBMC on a dedicated HTPC, so there is no window manager and/ or any additional applications installed.
*'''[[HOW-TO compile XBMC for Windows from source code|XBMC for Windows]]''' (see the [[XBMC for Windows port project]] for more information)
* You need minimum 4GB size Flash drive or harddisk drive to install on.
*'''[[HOW-TO compile XBMC for Xbox from source code|XBMC for Xbox]]'''
* Since you will use this PC only as a [http://en.wikipedia.org/wiki/Media_center media center]. I therefor assume that you use digital audio pass-through (S/PDIF or HDMI) to a receiver/amplifier with built-in Dolby Digital (AC3) decoder, and hence I choose NOT to install the dependency libraries for PulseAudio and compile XBMC later without PulseAudio support.


===Developing XBMC===
'''You will get:'''
The XBMC code structure uses a fairly modular design (with libraries and DLLs) who's structure is large, though relatively easy to grasp. XBMC's source code is predominantly C++, though there is a small splattering of C libraries and assembler for good measure. XBMC for uses the Microsoft DirectX multimedia framework (Direct3D) on the Xbox, and the [http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer SDL (Simple DirectMedia Layer) framework with OpenGL rendering] for other operating-system platforms versions of XBMC, (ie. [[XBMC for Linux port project|Linux]], [[XBMC for Mac OS X port project|Mac OS X]], and [[XBMC for Windows port project|Microsoft Windows]]).
* A dedicated HTPC which auto-boots directly to XBMC Media Center.
* Latest XBMC SVN version.
* Updated ALSA (audio) driver.
* Updated VIDEO (graphics) driver.
* LIRC (Microsoft MCE Remote will work out-of-the-box, however if you have any other remotes and/or LCD displays then you are on your own to solve the individual LIRC and LCDproc issues).
* Suspend/resume (works perfectly on for example ASUS P5N7A-VM motherboard with Intrepid).


The main XBMC program is developed using [http://en.wikipedia.org/wiki/Microsoft_Visual_Studio Microsoft Visual Studio] for the Xbox and win32 builds, and there are [http://en.wikipedia.org/wiki/KDevelop KDevelop] project files for Linux, and [http://en.wikipedia.org/wiki/Eclipse_%28software%29 Eclipse]/[http://en.wikipedia.org/wiki/Xcode Xcode] project files for Mac OS X).  For the Xbox version a copy of the latest Microsoft Xbox SDK (a.k.a. XDK) is also required, though obviously this is not required for all other platforms.
'''Known issues:'''
* Installations based on Intrepid having some performance issues, due to unidetified reason. You can read more on that [http://forum.xbmc.org/showthread.php?t=43075 here].
* You might have some difficulties with suspend/ resume on Hardy based installation


XBMC's code also contains three player cores: One core based on [[MPlayer]] that is only available to the Xbox version of XBMC, another [[DVDPlayer|in-house developed (FFmpeg-based) dedicated video-player core]] (which also supports DVD-Video movies with menus), and an [[PAPlayer|in-house developed dedicated music-player core]].
= Preparation =
'''FIRST STEP'''<BR>


:'''NOTE!''' For more detailed information on where to get started with XBMC development please see [[Appendix D: Development Notes|Appendix D (Development_Notes)]] in this wiki.
Download and burn Ubuntu Hardy or Intrepid mini.iso (according to your platform preference) from here:
<BR>https://help.ubuntu.com/community/Installation/MinimalCD


:'''TIP!''' [http://www.microsoft.com/Presspass/press/2008/feb08/02-18GSDPR.mspx Microsoft DreamSpark student program is currently (and over this summer) giving free access to their development software].
<span style="color:red">Please be aware, if you are installing a full Ubuntu system with GDM, then the guide will not fully work!</span>


== How To Apply as a Student ==
Now perform a default install.


===Before you can apply===
* '''When asked during the installation, please set „xbmc” as username and password at the account creation.'''
Before you can apply make sure you are qualified to apply:
* You have to know how to program in C++ (and know C) fairly well.
* We would like you to first submit a small patch that fixes a bug or adds a feature to XBMC. By doing that we will know if you are qualified for the task or not. At the bottom of this page there will be a list of possible [[Google Summer of Code 2008#Qualification_tasks|Qualification Tasks]], specific ideas that could be performed to show your skill, however you are free to submit anything you feel might be of value to XBMC. The qualification task can be done after you have filed you application.
* Submit a good application through the formal Google Summer of Code process during the application time frame.
* You have to have >35 hours per week to put into the project.
* You can not have another job at the same time as the GSoC project.


===Applying===
* 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.
If you are interested in participating in the Google Summer of Code you will need to register at the official GSoC site linked below and file an official application. Traditionally, the top applications are fairly detailed - you really need to sell yourself as well as your idea proposal. Look for example at this application [http://vfer.sourceforge.net/cgi-bin/index.cgi?page=writeup here] for inspiration. The official guide from Google can be found here:
* [http://groups.google.com/group/google-summer-of-code-announce/web/guide-to-the-gsoc-web-app-for-student-applicants Guide to the Google Summer of Code Web Application for Student Applicants]
* [http://code.google.com/soc/2008/student_step1.html Google Summer of Code - Student Signup]


*Sell your idea - Describe your idea in detail. What is the ultimate goal? What components will it have? What are the benefits for the user? How do you plan to ensure that the project gets completed on time? If a more detailed explanation of the idea already exists, what will you do that will go above and beyond all expectations?
''Apparently there seems to be an issue with '''''Intrepid''''' installer. If you are using flash drive, it's not installing GRUB for some reason.'' '''''<BR>This is only affect Intrepid, and only when you are installing it onto a flash drive.'''''


*Sell yourself - Make sure you get across how enthusiastic you are about the project. The more enthusiastic you are, the more assured we will be that you will finish your project. It also indicates that there is a good chance you will stick around even after the Summer of Code has finished. Why are you interested in Open Source and XBMC in particular? What interests do you have, and how do these relate to the project for which you are applying?
''To handle this, you have to options:''
# ''Either install Hardy(Ubuntu 8.04) mini.iso first, which is installing GRUB correctly, 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.''
# ''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.''


*Be enthusiastic - Summer of Code is a very exciting opportunity, and XBMC is a very exciting project to work on. We aren't just looking for someone who wants a summer job to pass their time and earn some money. We want people who have a passion towards open source and are likely to become constant contributors to XBMC and open source also once the summer has passed. The goal of the whole initiative is to have students find their way to open source together with mentoring and a good motivation.  
After you’ve 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 console on the htpc too, but then you will have a hard time type in everything.


:'''TIP!''' The [http://www.drupal.org/ Drupal] project has also prepared a couple of good guidelines that might be useful, see:
So once you logged in:
* http://drupal.org/node/59037
* http://drupal.org/node/59963


'''The application could have similar sections as in the following:'''
Name:
E-mail Address:
Project Title:
Project Goals:
Project Benefits:  How does your project benefit XBMC and its community?
Project Tasks and Deliverables: Break your project into tasks or pieces.
    Describe in detail what you plan to accomplish and what the results will be.


Project Schedule:  Estimate how long your project will take and how much time you
'''First of all, update the repositories, and install all prerequisites:'''
    have to dedicate on it. Try to establish a timed roadmap of the tasks to do.


Personal StatementTell us about yourself.  Describe why you are better than any
'''NEXT STEP'''
    other applicant for this project.
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
  # sudo apt-get update
</div>


===Google SoC Development Process===
'''NEXT STEP Hardy''' - <span style="color:red">Skip this and jump to '''''NEXT STEP Intrepid''''', if you are installing Intepid</span> <BR>
Each accepted project will be developed in its own sandbox (SVN branch), separate from the main XBMC codebase. Naturally, the end goal of each of the accepted XBMC projects ought to be to have that code in shape for acceptance into the production codebase. This page will track the status of each project and how well each student are doing.
<div style="height: auto; width: 1000px; overflow:auto; border: thin inset black; background: #E6E6FA">
# sudo apt-get --purge autoremove -y nvidia-kernel-common linux-restricted-modules-generic linux-restricted-modules-common linux-restricted-modules-2.6.24-23-generic
</div>


== Current Status ==
'''NEXT STEP Hardy''' - <span style="color:red">Skip this and jump to '''''NEXT STEP Intrepid''''', if you are installing Intepid</span> <BR>
* '''Next Big Date:''' March 24, 2008: Students may begin to submit applications through Google
<div style="height: auto; width: 1000px; overflow:auto; border: thin inset black; background: #E6E6FA">
* March 17, 2008: Google is scheduled to announce selected projects; ''XBMC is selected''
# sudo apt-get install -y linux-headers-generic localepurge 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 libmysqlclient15-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 libpng12-dev libjpeg-dev mesa-utils wget zip curl hal build-essential linux-headers-`uname -r` xorg pm-utils
* March 11, 2008: Submitted XBMC project application
</div>
* February 29, 2008: Created this wiki article


=== Schedule ===
'''NEXT STEP Intrepid'''<BR>
Official timeline: http://code.google.com/soc/2008/faqs.html#0.1_timeline
<div style="height: auto; width: 1000px; overflow:auto; border: thin inset black; background: #E6E6FA">
* March 31, 2008: Student application deadline, students must have submitted their proposals through Google.
# sudo apt-get install -y localepurge 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 libpng12-dev libjpeg-dev mesa-utils wget zip curl build-essential linux-headers-`uname -r` xorg pm-utils
* March 24-31, 2008: Students may submit applications for various Google Summer of Code projects.
</div>
* March 17, 2008: Google announces accepted organizations at: http://code.google.com/soc/
* March 3-12, 2008: Open source organizations may apply to the Google Summer of Code program.


== Project Proposals ==
During the installation of the packages, there will be a popup window to choose your locale languages to let "localepurge" know which locales not to remove in further installations. I would suggest to keep all en_us (3 all together) and your own country locales (again should be 3) as well. Localepurge will save you some space with removing unneccessary languages.<BR>
=== Overview ===
Qualifications for a good Summer of Code proposal:
* Discrete, well-defined, modular
* Comprised of a series of measurable sub-goals
* Based on open specs that are available free of charge
* Based on complete specs
An example of a good proposal is the implementation of a new feature or function that is not yet available in XBMC.


An example of a less desirable proposal is one that's not as measurable, such as refactoring an existing API. Bad proposals tend to be ones that would require touching a lot of core code.
= Upgrading ALSA (sound driver) to the latest version =


To re-iterate:
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).
* Localized/isolated code projects = ''good''
* Global code refactoring = ''bad''


=== Students Project Proposals ===
To download and use the script:
Feel free to enter a link to your proposal here if you are a college student and you will apply to Google Summer of Code this year:


* [[GSoC Project - One common GUI front-end that can control multiple PVR/DVR/HTPC back-ends|One common GUI front-end that can control multiple PVR/DVR/HTPC back-ends]]
'''NEXT STEP'''<BR>
**Proposed by student: '''Alcoheca'''
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
**Proposed mentor: JMarshall
# wget http://217.20.138.65/xbmc/AlsaUpgrade-1.0.x-rev-1.16.sh
</div>


=== Projects with Mentors (official approved projects) ===
'''NEXT STEP'''<BR>
* To come if and when Google accept the Students Project Proposals
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# chmod a+x AlsaUpgrade-1.0.x-rev-1.16.sh
</div>


=== Team-XBMC proposal ideas up for discussion ===
Most of the proposals in this list are just some project ideas that we have been kicking around, (which, by no means, limits any prospective proposals). So you are more than welcome to come up with a new idea that you think falls into the scope of XBMC and the Google Summer of Code spirit. Since XBMC is cross-platform software most of these ideas are platform-independent, meaning that if you implement the feature/function on one operating-system platform then someone else will be able to port that feature/function to the other operating-system platforms that XBMC runs on.


'''NOTE!''' THIS LIST IS NOT THE FINAL PROPOSALS THAT WILL BE SUBMITTED. THESE ARE ONLY CONCEPTS THAT IDEAS COULD BE BASED UPON, IN THE END YOU AS THE STUDENT WILL BE PRESENTING THE IDEA AS YOUR '''OWN''', SO IT IS NOT ONLY THE IDEA BUT HOW '''YOU''' PRESENT IT, SO BE CREATIVE!
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo ./AlsaUpgrade-1.0.x-rev-1.16.sh -di
</div>


* [http://forum.xbmc.org/showthread.php?t=28918  PVR front-end GUI that is skinnable and a API can can support multiple HTPC/DVR/PVR-backend clients]
If you are on Intrepid, you have to add the user created at installation to the „audio” group (you don't need to do that in case of Hardy).  
* Skinnable [http://forum.xbmc.org/showthread.php?t=12948 XMLTV GUI (TV-Guide)] frontend in XBMC and a method of downloading new [http://xmltv.org listings.xml]
** Suggest that either extend XBMC's [[Scraper.xml|Scraper API]] or use [[Python Scripts]] for downloading
* PVR software support (API to control channel-swapping and stream Live-TV of a third-party backend)
** [http://forum.xbmc.org/showthread.php?t=951 Linux VDR (Video Disk Recorder) client that can control a LinVDR server]
** [http://forum.xbmc.org/showthread.php?t=5376 MediaPortal client to control MediaPortal back-end (TV-Server)]
** [http://forum.xbmc.org/showthread.php?t=6636&highlight=mce+extender Windows Media Center Extender client that can control Microsoft Windows MCE]
* Native DVB television in XBMC for Linux via [http://www.linuxtv.org/ v4l/v4l2 library] and FFmpeg (added to [[DVDPlayer|XBMC's in-house video-player]])
**This would enable XBMC for Linux to display Live-TV and record TV without third-party backend.
**[http://www.ffmpeg.org Latest FFmpeg SVN] already have [http://www.linuxtv.org/ v4l/v4l2] support, but no tuning or channel-swapping features
* [[Hardware Accelerated Video Decoding]] of H.264 encoded video (in [[DVDPlayer|XBMC's FFmpeg-based in-house video player]])
**Off-loading some decoding processing parts to a OpenGL 2.0 GPU for assisted decoding
**[[Hardware Accelerated Video Decoding|The possible methods are GLSL or Cg Pixel Shader (Shader Model 3.0), and/or GPGPU technology]]
* [http://forum.xbmc.org/showthread.php?t=22407 Pictures database; scan EXIF (and IPTC) tags into a SQL db and add a library-mode view]
* Extend XBMC's [[Scraper.xml|Scraper API]] to also download [http://forum.xbmc.org/showthread.php?t=28953 games] metadata, (and maybe also  [http://forum.xbmc.org/showthread.php?t=28376 weather-forecasts])
**For [http://forum.xbmc.org/showthread.php?t=28953 games this will require a new SQL database and library view-mode in the "Programs" section]
* [http://forum.xbmc.org/showthread.php?t=27298 Unified Subtitle Parser / Display Filter Library for XBMC's in-house DVDPlayer video-player core]
**Create a Unified Subtitle Parser Library for external and embedded subtitles, plus a [http://wiki.multimedia.cx/index.php?title=Libavfilter FFmpeg libavfilter filter] for it
* [http://forum.xbmc.org/showthread.php?t=6169 Audio Equalizer in XBMC for music playback] with [[PAPlayer]], (and as a [http://wiki.multimedia.cx/index.php?title=Libavfilter FFmpeg libavfilter filter] for video)
* Add full [http://forum.xbmc.org/showthread.php?t=32029 VCD/SVCD menu and navigation support to XBMC] (possibly via xine-vcdnav/vcdx from [http://www.xinehq.hu Xine])
**[http://forum.xbmc.org/showthread.php?t=32029 Rocky Bernstein (the author of xine's vcdx plug-in)] has offered to mentor this if student is willing to make adding VCD/SVCD menu and navigation support to XBMC into their own GSoC project.
* Add [http://forum.xbmc.org/showthread.php?t=181&highlight=karaoke native support for text-display from Karaoke CD+G Audio-CD]s (possibly via [http://www.gnu.org/software/libcdio/ libcdio])
**As this would otherwise be a small task (since XBMC already supports displaying CDG graphics and already uses libcdio for other features such as ISO/IMG images reader and ISO 9660 reader, meaning you would really only have to [http://savannah.gnu.org/support/?104390 add CD+G subchannel support to libcdio]), so one would also expect this proposal to also include further additional karaoke functions and features under XBMC for Linux, such as microphone support (with recording and enabling the use of those microphones under both audio and video playback), and maybe voice-mask filters, and possibly [http://forum.xbmc.org/showthread.php?t=19157 Lyrics3v2 display] on top of visualizations and screensavers, etc.
* Rewrite the thumbnail caching system so that it can store multiple resolution thumbs.
**Essentially the "CacheThumb" routine should cache the thumb, cache information about the thumb (info on date, source, aspectratio, packed as small as feasible) and store both full size and scaled versions of the thumbs. The meta info would be stored in a separate file for fast assigning of thumbs (this could be kept in memory based on the thumb hash in a lookup table, and the ListItem.Thumb infoimage could be extended to specify what size of thumb it needs (to limit memory usage for xbox/lowmem devices).
* Rewrite XBMC's existing picture slideshow engine to be more like a normal player (see [[DVDPlayer]], [[PAPlayer]], and [[MODPlayer]] as examples).
**Utilize GUILargeImage to handle the loading, and the animation engine for the effects (pan/zoom/rotate, etc.)
* [http://forum.xbmc.org/showthread.php?t=1399&highlight=bittorrent BitTorrent GUI-frontend and a BiTorrent client-backend, a with download manager running in the background].
**This could allow XBMC user to search track RSS feeds and download items by filter.
**Separating the GUI-frontend from the client-backend makes it more portable and easier to replace client-backend.
* [http://forum.xbmc.org/showthread.php?t=25 Integrate a web-browser into XBMC GUI] using either [http://en.wikipedia.org/wiki/KHTML KHTML] or [http://en.wikipedia.org/wiki/WebKit WebKit] as the backend [http://en.wikipedia.org/wiki/Layout_engine HTML layout engine rendering backend] (as those are memory efficient and have few dependencies). Ideally it should be a GUI component that could be used throughout the XBMC GUI to properly display HTML code and pages. Noted should be that [http://forum.xbmc.org/showthread.php?t=11640 a web-browser called LinksBoks which is based on Links2Browser HTML layout engine rendering backend but with a custom frontend GUI was integreted into XBMC for Xbox once] however it was not kept maintained by its initial developer so it was never merged into the main SVN trunk (it is [https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linksbrowser still branched in the SVN though]), so in theory it could be possible to update the [https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linksbrowser linksbrowser SVN branch] but instead of Links2Browser integrate a new more memory efficient cross-portable [http://en.wikipedia.org/wiki/Layout_engine HTML layout engine rendering backend] with few dependencies and smaller footprint, such as [http://en.wikipedia.org/wiki/KHTML KHTML] or [http://en.wikipedia.org/wiki/WebKit WebKit].
* Simple RSS reader that supports text, video and pictures, (supporting multiple RSS feeds)
** Should be simple enough, like the RSS readers on mobile devices, suited for TV.
* Generic App Support - a very non-trivial much more generalized implementation would be an application / component that is able to capture the output and control an external application through a process pipe, shared memory, events, etc and have XBMC render it inside its own window. Such an implementation would mean we could more easily swap out browsers and also integrate other applications into XBMC. Of course this is highly non-trivial and many parts of it would be platform dependent. In terms of performance, such a technique will probably(?) not function too well for applications that require high fps. [http://people.freedesktop.org/~davidr/GLX_EXT_texture_from_pixmap.txt This OpenGL extension to convert a pixmap to a texture (used by compiz)] might prove useful.
* [http://forum.xbmc.org/showthread.php?t=6207 Synchronize music/video-stream playback on multiple-machines using PulseAudio (formerly PolypAudio)]
** Enable syncronized music or video playback over LAN (Local Area Network) or The Internet
* Port <u>all</u> of the existing [http://forum.xbmc.org/showthread.php?t=137 visualisations] and [http://forum.xbmc.org/showthread.php?t=7552 screensavers] available in XBMC for Xbox from DirectX to OpenGL, (doing so in a unified way that they are combined with the existing DirectX version so that they each supports both DirectX and OpenGL).
* [http://wiki.linuxmce.org/index.php/Home_Automation Home Automation Control: Control lighting, climate/heating, security, camera surveillance, and more].
**Implemented into XBMC via the same [http://plutohome.com/index.php?section=get_pluto Pluto] core libraries/code that [http://wiki.linuxmce.org/index.php/History LinuxMCE] uses.
* [http://en.wikipedia.org/wiki/BD-J BD-J (Blu-ray Disc Java)] library for Linux in order to have Blu-ray menu system support under [[DVDPlayer|XBMC video-player]]
* [http://en.wikipedia.org/wiki/Universal_Disk_Format UDF (Universal Disk Format) 2.50 and 2.60] support in [http://www.gnu.org/software/libcdio/ libcdio] (in order to read UDF formatted [http://en.wikipedia.org/wiki/Blu-ray_Disc Blu-ray discs])
* Implement [http://www.fireflymediaserver.org/ Firefly Media Server (previously known as "mt-daapd")] built-in DAAP-server into XBMC for Mac OS X
**Make it possible for XBMC for Mac OS X to use iTunes library (XBMC already have a DAAP-client)
**Note! No mentor has yet volunteered to help with Mac OS X specific coding!
* Fully port XBMC for Mac OS X to compile and run Mac OS X 10.4.x (Tiger)
**Note! No mentor has yet volunteered to help with Mac OS X specific coding!
* Fully port XBMC for Mac OS X to compile and run on PowerPC (PPC) architecture
**Maybe with the help of [http://www.finkproject.org The Fink Project] and/or [http://llvm.org The LLVM Compiler Infrastructure]?
**Note! No mentor has yet volunteered to help with Mac OS X specific coding!


== Qualification tasks ==
'''NEXT STEP'''<BR>
Please add a note here if you choose to work on a qualification task to avoid duplicate work. (To do so you need to register an account on this wiki and request 'ninja status' from a Team-XBMC member for that account).
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo usermod -a -G audio xbmc
</div>
('''''Please note:''''' replace „xbmc” with username you installed with)


Many students will probably apply for the Google Summer of Code and wish to work on a sexy multimedia project such as XBMC. All students will probably also claim to be hard workers, but we need a real method of determining which students have a higher probability for success. Thus, we will use this qualification system (adopted from FFmpeg SoC 2007 season). A student must successfully first complete a qualification task in order to be considered for an XBMC SoC project. In doing so, a student demonstrates that they:
<BR>
* Are willing to commit some time during the Summer of Code application review period in order to prove that they can code C++ satisfactorily in a clean, well-documented style.
You also have to edit the following file to make spdif and/or hdmi work properly:
* Can effectively navigate the XBMC codebase.
* Can communicate well with the XBMC development-team and community via the forum and IRC.
* Can accept feedback and revise code after review until it is suitable for inclusion in the main XBMC codebase.


:'''TIP!''' Do not be shy, speak your mind, and get involved with the public community!
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/modprobe.d/alsa-base
</div>


'''Frequent Objection #1:''' "''But I don't have time to do a qualification task!''" Then how do we know you will have time to work on your task during the summer? The qualification tasks are selected to be fairly trivial by XBMC standards and should not be too difficult for a prospective XBMC contributor. If they are too difficult, maybe XBMC is not the project for you. Also, be encouraged by the fact that the application review period comes after the application submission deadline; i.e., you can work on a qualification task after you submit an application to XBMC. But you will not be considered for an GSoC project slot unless you have satisfactorily completed a qualification task.
and add this line to the end:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
options snd-hda-intel model=6stack-dig
</div><BR>


'''Process:''' If you are truly interested in applying for XBMC's Summer of Code and, by extension, interested in working on a qualification task, the first step is to register a XBMC Community Forum Account, a SourceForge.NET Account and a XBMC Wiki Account (plus apply to get 'ninja status' for the Wiki by contacting a Team-XBMC member), and then publicly indicate that your interest and which project you plan to work on.
reboot the computer:


====Platform independent====
'''NEXT STEP'''<BR>
*FFmpeg wrapper for [http://forum.xbmc.org/showthread.php?t=21926 Libnemesi (the RTSP/RTP client library)] to use inside [[DVDPlayer|XBMC's in-house video-player (DVDPlayer)]]
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
** -- I'm willing to try this out - '''Alcoheca' - 27/2/2008
# sudo reboot
*FFmpeg wrapper for [http://forum.xbmc.org/showthread.php?t=21926 Libnemesi (the RTSP/RTP client library)] to use inside [[PAPlayer|XBMC's in-house audio-player (PAPlayer)]]
</div>
*Add [http://forum.xbmc.org/showthread.php?t=6982 libass library (Advanced SSA/ASS subtitle support)] to [[DVDPlayer|XBMC's in-house video-player (DVDPlayer)]]
* Implement a slow-cache system for the infomanager for those items that do not need to be retrieved more than about once a second, such as the proposed "Library.HasContent()" stuff which hits the db.


:'''Legacy Tasks''' - There is a growing back-log of 'interesting patches' and 'bug-reports' for XBMC on our patch-tracker and our bug-tracker which are both hosted on the XBMC SourceForge.net project site. Many of the patches have been abandoned by the original submitter, thus now requires volunteers to take the initiative to clean up each patch to the satisfaction of the project leaders and resubmit it for new review, so that it can be approved for SVN inclusion. As for the bugs, please try to fix enough bugs to show of your skill. See:
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:
:* XBMC patch-tracker: [http://sourceforge.net/tracker/?group_id=87054&atid=581840 http://sourceforge.net/tracker/?group_id=87054&atid=581840]
:* XBMC bug-tracker: https://sourceforge.net/tracker/?group_id=87054&atid=581838


:'''Note!''' If you have an idea for a other simple task, come and discuss it on the development forums and the devs might approve it.
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# more /proc/asound/version
</div>


====XBMC for Linux====
If you see driver version 1.0.19 here, you can continue, but it's shows 1.0.17 as driver version, then you have to repeat the last 3 step (upgrade, reboot, check).
*Port an existing XBMC (for Xbox) DirectX/HLSL screensaver or visualisation to OpenGL/GLSL
* Complete the missing audio codecs (ADPlug and SHN) for [[PAPlayer|XBMC's in-house audio-player (PAPlayer)]]


====XBMC for Mac OS X====
If it’s OK, then you can delete the just downloaded ALSA source to free up some disk space:
*Port an existing XBMC (for Xbox) DirectX/HLSL screensaver or visualisation to OpenGL/GLSL
*Mac OS X 64-bit x86 running: Patches to make XBMC for Mac OS X closer to running on 64-bit x86 architecture. Should be easier now that it's working on AMD64 Linux.  E-mail malloc AT xbmc DOT org with questions.
*Port an existing XBMC (for Xbox) DirectX/HLSL screensaver or visualisation to OpenGL/GLSL


====XBMC for Windows====
'''NEXT STEP'''<BR>
*Port an existing XBMC (for Xbox) DirectX/HLSL screensaver or visualisation to OpenGL/GLSL
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
*XBMC for Windows (Win32) compiling:
# sudo rm -r /usr/src/Alsa-1.0.19/
** Patches to make XBMC for Windows (SDL/OpenGL-based from the linuxport branch) closer to fully working on a Windows XP (32-bit x86) architecture.
</div>


====XBMC for Xbox====
Now run alsamixer:
*Update a few third-party library/module that XBMC for Xbox depends on and submit a patch for the update
**For example: libCDIO, CxImage, libcurl, libshout, libsamba, libPython, libSQLite, FileZilla (server), libDAAP, libfreetype (FreeType2)
* Fix enough bugs to show skill https://sourceforge.net/tracker/?func=browse&group_id=87054&atid=581838


=Mentors and Contact methods=
'''NEXT STEP'''<BR>
Mentors are developers from [[Team XBMC and Others|Team-XBMC]] and members of [http://sourceforge.net/projects/xbmc The XBMC Project] that have volunteered to assist and mentor non-official XBMC developers in any non-trivial way they can, helping you by checking, commenting and committing your code patches to our SVN source code tree. These mentors have chosen an area they prefer to specialize in, usually this is an area in which they feel they have most interest, knowledge, and expertise in.
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# alsamixer
</div>


* [[User:Jmarshall|JMarshall]]: Anything GUI related, Music Library, Video Library, PAPlayer, etc.
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.
* [[User:Spiff|Spiff]]: Anything other than DllLoader/MPlayer/DVDPlayer internals.
* [[User:Yuvalt|Yuvalt]]: Everything Linux
* [[User:D4rk|D4rk]]: OpenGL, other Linux stuff
* [[User:malloc|malloc]]: Everything Linux


:'''NOTE!''' All GSoC students should feel comfortable to not only approach your assigned mentors but also to approach ANY mentor and ANY [[Team-XBMC|Team-XBMC member]] with your questions and problems, [[Team-XBMC|Team-XBMC]] is not only a team by name but we do our best to work as a team as well.
= Update Video driver =


==Contact methods==
== Nvidia==
These are developers forums for XBMC development, (programmers/coders only!).<br>
Respect, these are not for posting feature-requests or end-user support requests!
* IRC: [irc://irc.freenode.net/xbmc-gsoc #xbmc-gsoc on freenode] temporary [http://freenode.net IRC network channel] used for the GSoC qualification/proposal stage.
**This [irc://irc.freenode.net/xbmc-gsoc #xbmc-gsoc] IRC-channel will be used for students and mentors until the [http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_timeline 14th of April]
* IRC: [irc://irc.freenode.net/xbmc-linux #xbmc-linux on freenode] official [http://freenode.net IRC network channel] for the XBMC Linux port project
**(You may also sometimes find developers hanging out at [irc://irc.freenode.net/xbmc #xbmc on freenode])
* IRC: [irc://irc.freenode.net/xbmc-osx #xbmc-osx on freenode] official [http://freenode.net IRC network channel] for the XBMC Mac OS X port
* [http://forum.xbmc.org/forumdisplay.php?f=41 XBMC for Linux port Community-Forum for developers only]
** [http://forum.xbmc.org/forumdisplay.php?f=52 XBMC for Linux port Community-Forum for end-users (unmoderated so far)]
* [http://forum.xbmc.org/forumdisplay.php?f=57 XBMC for Mac OS X port Community-Forum for developers only]
** [http://forum.xbmc.org/forumdisplay.php?f=56 XBMC for Mac OS X port Community-Forum for end-users (unmoderated so far)]
* [[HOW-TO submit a patch]] (where and how to submit source code)


''(For Ati owners: jump to [[#Ati]])''


[[category:Google Summer of Code]]
'''NEXT STEP'''<BR>
[[category:Development]]
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
[[category:Inner Workings]]
# wget ftp://download.nvidia.com/XFree86/Linux-x86/180.37/NVIDIA-Linux-x86-180.37-pkg1.run
[[category:Linux]]
</div>
[[category:Mac OS X]]
 
[[category:Microsoft Windows]]
'''NEXT STEP'''<BR>
[[category:OpenGL]]
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
[[category:To-Do]]
# sudo sh NVIDIA-Linux-x86-180.37-pkg1.run
</div>
 
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'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# rm NVIDIA-Linux-x86-180.37-pkg1.run
</div>
 
=== xorg.conf configuration (Nvidia) ===
 
If you want your Xorg autodetect the native resolutions from EDID and want to use 24p you have to replace your xorg.conf with this (not guaranteed to work, but should with newer Nvidia cards):
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/xorg.conf -O /etc/X11/xorg.conf
</div>
 
'''''(To continue click on: [[#Download, compile, and install XBMC from source]] (skip section Ati))'''''
 
<BR>
 
== Ati ==
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get install -y cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# wget http://www2.ati.com/drivers/linux/ati-driver-installer-8-12-x86.x86_64.run
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo sh ati-driver-installer-8-12-x86.x86_64.run --buildpkg Ubuntu/intrepid
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo dpkg -i xorg-driver-fglrx_8.561-0ubuntu1_i386.deb fglrx-kernel-source_8.561-0ubuntu1_i386.deb fglrx-amdcccle_8.561-0ubuntu1_i386.deb
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# rm ati-driver-installer-8-12-x86.x86_64.run  *.deb
</div>
 
=== xorg.conf configuration (Ati) ===
Will be discussed later, stay tuned
 
<BR>
 
= Download, compile, and install XBMC from source =
 
'''NEXT STEP''' - <span style="color:red">This is the main trunk, skip to the following step, if you want to use vdpau<BR>
<div style="height: auto; width: 1000px; overflow:auto; border: thin inset black; background: #E6E6FA">
# svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC
</div>
 
In case of Hardy, you will get a certificate warning, accept it permanetly by pressing „P”.
Wait for downloading XBMC source files, might takes long time, depend on your Internet connection.
 
'''OPTIONAL STEP''' - <span style="color:red">In case you want to use vdpau branch, skip if you choosed the main trunk<BR>
'''''You have to have vdpau compatible VGA vard for this with 512MB video ram at least!'''''
<div style="height: auto; width: 1000px; overflow:auto; border: thin inset black; background: #E6E6FA">
# svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/xbmc-vdpau/XBMC
</div>
 
In case of Hardy, you will get a certificate warning, accept it permanetly by pressing „P”.
Wait for downloading XBMC source files, might takes long time, depend on your Internet connection.
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# cd XBMC
</div>
 
Then configure, compile, and install XBMC:
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# ./configure --prefix=/usr --disable-pulse
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# make -j2 ('''''Please note''''': use only „make”, if you don’t have a dualcore CPU)
</div>
 
This is again, can take quite some time, depending on your CPU speed.
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo make install
</div>
 
<BR>
 
= Autoboot to XBMC =
 
'''WARNING!!! Do NOT follow this section unless you understand what EVERY step is actually doing.  The original author hasn't thoroughly explained each step. If something goes wrong you WILL NOT be able to easily get to a normal desktop, so if you aren't 100% comfortable with recovering any and all issues in Linux from the command line, THINK TWICE!!!  You can easily setup gdm to auto login and gnome to autostart XBMC.'''
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/xbmc -O /etc/init.d/xbmc
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo chmod a+x /etc/init.d/xbmc
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo update-rc.d -f xbmc defaults
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/runXBMC.sh -O /usr/bin/runXBMC.sh
</div>
If you not choosed "xbmc" as your user at the installation, you have to modify this file according to your username.
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo chmod a+x /usr/bin/runXBMC.sh
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/setAlsaVolumes.py -O /usr/bin/setAlsaVolumes.py
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo chmod a+x /usr/bin/setAlsaVolumes.py
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo dpkg-reconfigure x11-common
</div>
And choose "anyone" to run X. Leave the other question on default.
 
<BR>
 
= Install Lirc =
 
I've found MS MCE Remotes, listed here: http://www.mythtv.org/wiki/MCE_Remote, are plug & plays, working out of the box. I also found, that there're remotes out there, which instalation are a real pain. The choise is yours. If you have one of the above mentioned MS MCE remotes, the installation is that simple:
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get install -y lirc
</div>
 
And follow the wizard.
 
<BR>
= Power Management =
 
To be able to control power management (suspend, shutdown, reboot) from within XBMC, you have to modify PolicyKit.conf to grant privilegies to your user for power management. There is a preprepared PolicyKit.conf for this, you can get it by:
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/PolicyKit.conf -O /etc/PolicyKit/PolicyKit.conf
</div>
Please note: if you installed your system with username other than "xbmc" at the begining, you have to modify that in the file.
 
 
If you wish to enable CPU scaling, install the required packages as the following, but '''don’t forget to enable it in the BIOS as well'''.
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get install powernowd
</div>
 
<BR>
 
= Install Splash =
You may want to have a look at du-duke's fantastique splash screens. You can check these here: http://du-duke.blogspot.com/
You can download your choice below.
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get -y install usplash libusplash-dev
</div>
 
'''NEXT STEP Hardy''' - <span style="color:red">Skip this and jump to '''''NEXT STEP Intrepid''''', if you are installing Intepid</span> <BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get -y install usplash-theme-ubuntu
</div>
 
'''NEXT STEP Hardy''' - <span style="color:red">Skip this and jump to '''''NEXT STEP Intrepid''''', if you are installing Intepid</span> <BR>
'''<span style="color:red">CHOICE 1</span> - Downloading spinner-blue'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/splash/usplash-spinner-hardy.so -O /usr/lib/usplash/usplash-theme-ubuntu.so
</div>
 
'''NEXT STEP Hardy''' - <span style="color:red">Skip this and jump to '''''NEXT STEP Intrepid''''', if you are installing Intepid</span> <BR>
'''<span style="color:red">CHOICE 2</span> - Downloading pulsating-logo'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/splash/usplash-pulsating-hardy.so -O /usr/lib/usplash/usplash-theme-ubuntu.so
</div>
 
'''NEXT STEP Intrepid'''<BR>
'''<span style="color:red">CHOICE 1</span> - Downloading spinner-blue'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/splash/usplash-spinner-intrepid.so -O /usr/lib/usplash/usplash-theme-ubuntu.so
</div>
 
'''NEXT STEP Intrepid'''<BR>
'''<span style="color:red">CHOICE 2</span> - Downloading pulsating-logo'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo wget http://217.20.138.65/xbmc/splash/usplash-pulsating-intrepid.so -O /usr/lib/usplash/usplash-theme-ubuntu.so
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/usplash.conf
</div>
 
and set your desired splash resolution, so inserting the following to here.
('''''Please note:''''' this is a FullHD example):
 
<div style="height: auto; border: thin inset black; background: #E6E6FA">
xres=1920<BR>
yres=1080
</div>
 
'''NEXT STEP'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo update-initramfs -u
</div>
 
<BR>
 
= Enable thermal monitoring =
 
To install the necessary package:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get install -y lm-sensors
</div>
 
Once lm-sensors installed, you have to run sensor detection to identify your sensors:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo sensors-detect
</div>
There will be a lot of questions here, but you can answer by "enter" key to all of them, '''except the last question'''.
So answer "enter" to all questions, until you see the the question "Do you want to add these lines automatically?" At here, you have to type "yes", then enter.
 
Reboot the computer:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo reboot
</div>
 
After rebooted, check if the sensors are working:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sensors -u
</div>
You should see the output of the sensors here.<BR>
 
== XBMC CPU temp detection ==
 
To let XBMC detect your CPU temps provided by lm-sensors, you have to edit your advancedsettings.xml and insert the following:
<div style="height: auto; border: thin inset black; background: #E6E6FA">
<advancedsettings> <BR>
<cputempcommand>echo "$(sensors | grep "Core 0" | sed -e 's/[a-z]*..............\([0-9].\)\..*/\1/') C"</cputempcommand> <BR>
</advancedsettings> <BR>
</div> <BR>
 
== XBMC GPU (nvidia) temp detection ==
To let XBMC detect your GPU temps provided by nvidia-settings, you have to edit your advancedsettings.xml and insert the following:
<div style="height: auto; border: thin inset black; background: #E6E6FA">
<advancedsettings> <BR>
<gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand> <BR>
</advancedsettings> <BR>
</div>
 
 
<BR>
 
= Enable eject button of your ODD =
 
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/sysctl.conf
</div>
 
and uncomment (by deleting # from the begining of the line) the last line, so it will look like this:
 
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
dev.cdrom.lock=0
</div>
 
<BR>
= Reduce boot time =
 
'''reduce GRUB waiting (~2 sec)'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /boot/grub/menu.lst
</div>
 
Find the timeout (currently set to 3) and change this to 0
 
 
'''reduce the number of loaded vts (virtual terminal service)'''<BR>
 
By default, there're F1 through F7, we don't need that much for a HTPC, so we can remove most of them.
 
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/event.d/tty3
</div>
 
and comment out all the lines, using #.
Repeat the above command for tty4-tty6, so at the end you've deactivated 3 vts's.
 
 
'''Enable concurrent booting (if you own a dual-core CPU)'''<BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/init.d/rc
</div>
 
Find the line "CONCURRENCY=none" and change it to "CONCURRENCY=shell"
 
 
'''Disable unneccessary services'''<BR>
Install the necessary application
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get -y install sysv-rc-conf
</div><BR>
 
And run it:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo sysv-rc-conf
</div>
Navigate with your cursor keys, you can disable services by clearing X in each runlevel by "space" key.<BR>
You can disable the following services:
<BR>
* apparmor<BR>
* dns-clean<BR>
* fancontrol (unless you're using it)<BR>
* pppd-dns<BR>
* rsync<BR>
 
<BR>
 
= BIOS OEM Splash screen =
Recent motherboards usually featured with the possibility to change to BIOS OEM logo. Below you can find a modified XBMC logo. The format and size of the picture has been modified to fit into the BIOS (ASUS P5N7A-VM), '''''there is no guarantee to work with any other motherboard, but I guess it should work with all boards with newer AMI bioses.'''''
 
'''''BE AWARE! I take no responsibility if you brick your motherboard while playing with BIOS.'''''
 
In case of ASUS, you can do it with MyLogo2, which is a bundled tool for your MB.
 
The aspect ratio of the picture is like this for purpose. When your BIOS displays it, it will stretch to fit to the screen. So this is made for 16:9 (not for 4:3, and nor for 16:10)
 
[[Image:Bios splash pwrd by xbmc.jpg|360px|http://217.20.138.65/xbmc/pwrd_by_xbmc_bios_splash.bmp]] [[Image:Bios splash oldFor16x9.jpg|360px|http://217.20.138.65/xbmc/Splash_oldFor16x9.bmp]]
<BR>[http://217.20.138.65/xbmc/pwrd_by_xbmc_bios_splash.bmp Download1] [http://217.20.138.65/xbmc/Splash_oldFor16x9.bmp Download2]
 
 
<BR>
 
= Wake On Lan =
 
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo apt-get install -y ethtool
</div><BR>
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo nano /etc/init.d/wol.sh
</div>
 
Copy the following text into it, then save the file:
 
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
ethtool -s eth0 wol g
</div><BR>
Make this newly created script executable:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo chmod a+x /etc/init.d/wol.sh
</div><BR>
Make it start during boot:
<div style="height: 32px; border: thin inset black; background: #E6E6FA">
# sudo update-rc.d -f wol.sh defaults
</div>
 
<BR>
= Sound configuration in XBMC =
 
After booted into XBMC switch to „digital” audio output, than '''''choose the AC3 and DTS capabilities''''' according to your receiver.
 
<BR>'''''For SPDIF:'''''                                   
<BR>Leave audio output device: default           
<BR>Leave passthrough to IEC958                   
<BR>[[Image:Audio_iec958_default_1.jpg]]
<BR> 
 
'''''For HDMI:'''''
<BR>Change audio output device to hdmi
<BR>Change passthrough to hdmi
<BR>[[Image:Audio hdmi.jpg|Audio hdmi.jpg]]
<BR>(you will loose analog sound eg. navigation sound in case of hdmi)
<BR>
 
= MythTV =
 
You may want to have a look at here:
 
http://wiki.xbmc.org/?title=MythTV

Revision as of 22:06, 20 March 2009

The purpose of this guide is to give a hand to new XBMC users, who want to build a Linux based, dedicated HTPC (Home Theater PC), a true living-room media center computer, but don't have any knowledge and experience in the Linux world.

You always have the chance to try XBMC Live to test/demo XBMC Media Center, but if you want to have more control and more customization possibilities, than a Linux installation like in this guide is more suitable.

Introduction

This is a real step-by-step guide, I hope everybody can follow and walk through the whole installation procedure. The guide is based on either Ubuntu 8.04 (Hardy Heron) or 8.10 (Intrepid Ibex) as a platform, start with a minimal install and only install the needed components at the top of that.

On the face of it, maybe seems very lengthy process, but you will feel shorter while you follow it.

Please note:

  • The guide is for using XBMC on a dedicated HTPC, so there is no window manager and/ or any additional applications installed.
  • You need minimum 4GB size Flash drive or harddisk drive to install on.
  • Since you will use this PC only as a media center. I therefor assume that you use digital audio pass-through (S/PDIF or HDMI) to a receiver/amplifier with built-in Dolby Digital (AC3) decoder, and hence I choose NOT to install the dependency libraries for PulseAudio and compile XBMC later without PulseAudio support.

You will get:

  • A dedicated HTPC which auto-boots directly to XBMC Media Center.
  • Latest XBMC SVN version.
  • Updated ALSA (audio) driver.
  • Updated VIDEO (graphics) driver.
  • LIRC (Microsoft MCE Remote will work out-of-the-box, however if you have any other remotes and/or LCD displays then you are on your own to solve the individual LIRC and LCDproc issues).
  • Suspend/resume (works perfectly on for example ASUS P5N7A-VM motherboard with Intrepid).

Known issues:

  • Installations based on Intrepid having some performance issues, due to unidetified reason. You can read more on that here.
  • You might have some difficulties with suspend/ resume on Hardy based installation

Preparation

FIRST STEP

Download and burn Ubuntu Hardy or Intrepid mini.iso (according to your platform preference) from here:
https://help.ubuntu.com/community/Installation/MinimalCD

Please be aware, if you are installing a full Ubuntu system with GDM, then the guide will not fully work!

Now perform a default install.

  • When asked during the installation, please set „xbmc” as username and password at the account creation.
  • 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.

Apparently there seems to be an issue with Intrepid installer. If you are using flash drive, it's not installing GRUB for some reason.
This is only affect Intrepid, and only when you are installing it onto a flash drive.

To handle this, you have to options:

  1. Either install Hardy(Ubuntu 8.04) mini.iso first, which is installing GRUB correctly, 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.
  2. 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.

After you’ve 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 console on the htpc too, but then you will have a hard time type in everything.

So once you logged in:


First of all, update the repositories, and install all prerequisites:

NEXT STEP

# sudo apt-get update

NEXT STEP Hardy - Skip this and jump to NEXT STEP Intrepid, if you are installing Intepid

# sudo apt-get --purge autoremove -y nvidia-kernel-common linux-restricted-modules-generic linux-restricted-modules-common linux-restricted-modules-2.6.24-23-generic

NEXT STEP Hardy - Skip this and jump to NEXT STEP Intrepid, if you are installing Intepid

# sudo apt-get install -y linux-headers-generic localepurge 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 libmysqlclient15-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 libpng12-dev libjpeg-dev mesa-utils wget zip curl hal build-essential linux-headers-`uname -r` xorg pm-utils

NEXT STEP Intrepid

# sudo apt-get install -y localepurge 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 libpng12-dev libjpeg-dev mesa-utils wget zip curl build-essential linux-headers-`uname -r` xorg pm-utils

During the installation of the packages, there will be a popup window to choose your locale languages to let "localepurge" know which locales not to remove in further installations. I would suggest to keep all en_us (3 all together) and your own country locales (again should be 3) as well. Localepurge will save you some space with removing unneccessary languages.

Upgrading ALSA (sound driver) to the latest version

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 the script:

NEXT STEP

# wget http://217.20.138.65/xbmc/AlsaUpgrade-1.0.x-rev-1.16.sh

NEXT STEP

# chmod a+x AlsaUpgrade-1.0.x-rev-1.16.sh


NEXT STEP

# sudo ./AlsaUpgrade-1.0.x-rev-1.16.sh -di

If you are on Intrepid, you have to add the user created at installation to the „audio” group (you don't need to do that in case of Hardy).

NEXT STEP

# sudo usermod -a -G audio xbmc 

(Please note: replace „xbmc” with username you installed with)


You also have to edit the following file to make spdif and/or hdmi work properly:

NEXT STEP

# sudo nano /etc/modprobe.d/alsa-base

and add this line to the end:

options snd-hda-intel model=6stack-dig


reboot the computer:

NEXT STEP

# 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

# more /proc/asound/version

If you see driver version 1.0.19 here, you can continue, but it's shows 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

# sudo rm -r /usr/src/Alsa-1.0.19/

Now run alsamixer:

NEXT STEP

# 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.

Update Video driver

Nvidia

(For Ati owners: jump to #Ati)

NEXT STEP

# wget ftp://download.nvidia.com/XFree86/Linux-x86/180.37/NVIDIA-Linux-x86-180.37-pkg1.run

NEXT STEP

# sudo sh NVIDIA-Linux-x86-180.37-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

# rm NVIDIA-Linux-x86-180.37-pkg1.run

xorg.conf configuration (Nvidia)

If you want your Xorg autodetect the native resolutions from EDID and want to use 24p you have to replace your xorg.conf with this (not guaranteed to work, but should with newer Nvidia cards):

NEXT STEP

# sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

NEXT STEP

# sudo wget http://217.20.138.65/xbmc/xorg.conf -O /etc/X11/xorg.conf

(To continue click on: #Download, compile, and install XBMC from source (skip section Ati))


Ati

NEXT STEP

# sudo apt-get install -y cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms

NEXT STEP

# wget http://www2.ati.com/drivers/linux/ati-driver-installer-8-12-x86.x86_64.run

NEXT STEP

# sudo sh ati-driver-installer-8-12-x86.x86_64.run --buildpkg Ubuntu/intrepid

NEXT STEP

# sudo dpkg -i xorg-driver-fglrx_8.561-0ubuntu1_i386.deb fglrx-kernel-source_8.561-0ubuntu1_i386.deb fglrx-amdcccle_8.561-0ubuntu1_i386.deb

NEXT STEP

# rm ati-driver-installer-8-12-x86.x86_64.run  *.deb

xorg.conf configuration (Ati)

Will be discussed later, stay tuned


Download, compile, and install XBMC from source

NEXT STEP - This is the main trunk, skip to the following step, if you want to use vdpau

# svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC

In case of Hardy, you will get a certificate warning, accept it permanetly by pressing „P”. Wait for downloading XBMC source files, might takes long time, depend on your Internet connection.

OPTIONAL STEP - In case you want to use vdpau branch, skip if you choosed the main trunk
You have to have vdpau compatible VGA vard for this with 512MB video ram at least!

# svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/xbmc-vdpau/XBMC

In case of Hardy, you will get a certificate warning, accept it permanetly by pressing „P”. Wait for downloading XBMC source files, might takes long time, depend on your Internet connection.

NEXT STEP

# cd XBMC

Then configure, compile, and install XBMC:

NEXT STEP

# ./configure --prefix=/usr --disable-pulse

NEXT STEP

# make -j2 (Please note: use only „make”, if you don’t have a dualcore CPU)

This is again, can take quite some time, depending on your CPU speed.

NEXT STEP

# sudo make install


Autoboot to XBMC

WARNING!!! Do NOT follow this section unless you understand what EVERY step is actually doing. The original author hasn't thoroughly explained each step. If something goes wrong you WILL NOT be able to easily get to a normal desktop, so if you aren't 100% comfortable with recovering any and all issues in Linux from the command line, THINK TWICE!!! You can easily setup gdm to auto login and gnome to autostart XBMC.

NEXT STEP

# sudo wget http://217.20.138.65/xbmc/xbmc -O /etc/init.d/xbmc

NEXT STEP

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

NEXT STEP

# sudo update-rc.d -f xbmc defaults

NEXT STEP

# sudo wget http://217.20.138.65/xbmc/runXBMC.sh -O /usr/bin/runXBMC.sh

If you not choosed "xbmc" as your user at the installation, you have to modify this file according to your username.

NEXT STEP

# sudo chmod a+x /usr/bin/runXBMC.sh

NEXT STEP

# sudo wget http://217.20.138.65/xbmc/setAlsaVolumes.py -O /usr/bin/setAlsaVolumes.py

NEXT STEP

# sudo chmod a+x /usr/bin/setAlsaVolumes.py

NEXT STEP

# sudo dpkg-reconfigure x11-common

And choose "anyone" to run X. Leave the other question on default.


Install Lirc

I've found MS MCE Remotes, listed here: http://www.mythtv.org/wiki/MCE_Remote, are plug & plays, working out of the box. I also found, that there're remotes out there, which instalation are a real pain. The choise is yours. If you have one of the above mentioned MS MCE remotes, the installation is that simple:

NEXT STEP

# 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 modify PolicyKit.conf to grant privilegies to your user for power management. There is a preprepared PolicyKit.conf for this, you can get it by:

NEXT STEP

# sudo wget http://217.20.138.65/xbmc/PolicyKit.conf -O /etc/PolicyKit/PolicyKit.conf

Please note: if you installed your system with username other than "xbmc" at the begining, you have to modify that in the file.


If you wish to enable CPU scaling, install the required packages as the following, but don’t forget to enable it in the BIOS as well.

NEXT STEP

# sudo apt-get install powernowd


Install Splash

You may want to have a look at du-duke's fantastique splash screens. You can check these here: http://du-duke.blogspot.com/ You can download your choice below.

NEXT STEP

# sudo apt-get -y install usplash libusplash-dev

NEXT STEP Hardy - Skip this and jump to NEXT STEP Intrepid, if you are installing Intepid

# sudo apt-get -y install usplash-theme-ubuntu

NEXT STEP Hardy - Skip this and jump to NEXT STEP Intrepid, if you are installing Intepid
CHOICE 1 - Downloading spinner-blue

# sudo wget http://217.20.138.65/xbmc/splash/usplash-spinner-hardy.so -O /usr/lib/usplash/usplash-theme-ubuntu.so

NEXT STEP Hardy - Skip this and jump to NEXT STEP Intrepid, if you are installing Intepid
CHOICE 2 - Downloading pulsating-logo

# sudo wget http://217.20.138.65/xbmc/splash/usplash-pulsating-hardy.so -O /usr/lib/usplash/usplash-theme-ubuntu.so

NEXT STEP Intrepid
CHOICE 1 - Downloading spinner-blue

# sudo wget http://217.20.138.65/xbmc/splash/usplash-spinner-intrepid.so -O /usr/lib/usplash/usplash-theme-ubuntu.so

NEXT STEP Intrepid
CHOICE 2 - Downloading pulsating-logo

# sudo wget http://217.20.138.65/xbmc/splash/usplash-pulsating-intrepid.so -O /usr/lib/usplash/usplash-theme-ubuntu.so

NEXT STEP

# sudo nano /etc/usplash.conf

and set your desired splash resolution, so inserting the following to here. (Please note: this is a FullHD example):

xres=1920
yres=1080

NEXT STEP

# sudo update-initramfs -u


Enable thermal monitoring

To install the necessary package:

# sudo apt-get install -y lm-sensors

Once lm-sensors installed, you have to run sensor detection to identify your sensors:

# sudo sensors-detect

There will be a lot of questions here, but you can answer by "enter" key to all of them, except the last question. So answer "enter" to all questions, until you see the the question "Do you want to add these lines automatically?" At here, you have to type "yes", then enter.

Reboot the computer:

# sudo reboot

After rebooted, check if the sensors are working:

# sensors -u

You should see the output of the sensors here.

XBMC CPU temp detection

To let XBMC detect your CPU temps provided by lm-sensors, you have to edit your advancedsettings.xml and insert the following:

<advancedsettings>
<cputempcommand>echo "$(sensors | grep "Core 0" | sed -e 's/[a-z]*..............\([0-9].\)\..*/\1/') C"</cputempcommand>
</advancedsettings>


XBMC GPU (nvidia) temp detection

To let XBMC detect your GPU temps provided by nvidia-settings, you have to edit your advancedsettings.xml and insert the following:

<advancedsettings>
<gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand>
</advancedsettings>



Enable eject button of your ODD

# sudo nano /etc/sysctl.conf

and uncomment (by deleting # from the begining of the line) the last line, so it will look like this:

dev.cdrom.lock=0


Reduce boot time

reduce GRUB waiting (~2 sec)

# sudo nano /boot/grub/menu.lst

Find the timeout (currently set to 3) and change this to 0


reduce the number of loaded vts (virtual terminal service)

By default, there're F1 through F7, we don't need that much for a HTPC, so we can remove most of them.

# sudo nano /etc/event.d/tty3

and comment out all the lines, using #. Repeat the above command for tty4-tty6, so at the end you've deactivated 3 vts's.


Enable concurrent booting (if you own a dual-core CPU)

# sudo nano /etc/init.d/rc

Find the line "CONCURRENCY=none" and change it to "CONCURRENCY=shell"


Disable unneccessary services
Install the necessary application

# sudo apt-get -y install sysv-rc-conf


And run it:

# sudo sysv-rc-conf

Navigate with your cursor keys, you can disable services by clearing X in each runlevel by "space" key.
You can disable the following services:

  • apparmor
  • dns-clean
  • fancontrol (unless you're using it)
  • pppd-dns
  • rsync


BIOS OEM Splash screen

Recent motherboards usually featured with the possibility to change to BIOS OEM logo. Below you can find a modified XBMC logo. The format and size of the picture has been modified to fit into the BIOS (ASUS P5N7A-VM), there is no guarantee to work with any other motherboard, but I guess it should work with all boards with newer AMI bioses.

BE AWARE! I take no responsibility if you brick your motherboard while playing with BIOS.

In case of ASUS, you can do it with MyLogo2, which is a bundled tool for your MB.

The aspect ratio of the picture is like this for purpose. When your BIOS displays it, it will stretch to fit to the screen. So this is made for 16:9 (not for 4:3, and nor for 16:10)

http://217.20.138.65/xbmc/pwrd_by_xbmc_bios_splash.bmp http://217.20.138.65/xbmc/Splash_oldFor16x9.bmp
Download1 Download2



Wake On Lan

# sudo apt-get install -y ethtool


# sudo nano /etc/init.d/wol.sh

Copy the following text into it, then save the file:

ethtool -s eth0 wol g


Make this newly created script executable:

# sudo chmod a+x /etc/init.d/wol.sh


Make it start during boot:

# sudo update-rc.d -f wol.sh defaults


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
Leave passthrough to IEC958
Audio iec958 default 1.jpg

For HDMI:
Change audio output device to hdmi
Change passthrough to hdmi
Audio hdmi.jpg
(you will loose analog sound eg. navigation sound in case of hdmi)

MythTV

You may want to have a look at here:

http://wiki.xbmc.org/?title=MythTV