XBMC

From Hurlster Wiki
Revision as of 01:15, 28 September 2012 by Gqwill69 (talk | contribs) (→‎Xorg.conf)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a tutorial on how to compile and install XBMC on Debian or Ubuntu

PPA for Unstable Natty

sudo add-apt-repository ppa:team-xbmc/unstable
apt-get update && apt-get install xbmc

Checkout with Git

Development has moved to git, rather than subversion. You will need git installed to do this.

$ sudo aptitude install git

git clone git://github.com/xbmc/xbmc.git

Checkout from subversion (Legacy)

You will need to have subversion installed to do this.

$ sudo aptitude install subversion

svn co svnsite.com xbmc

This will create a "xbmc" directory in your current directory.

Install Packages

You'll have to install the necessary dependencies. First do this.

$ sudo aptitude update

Then see README.ubuntu for the required packages. The file includes a handy aptitude line which you can just paste in the terminal.

Configure

$ cd xbmc
$ ./bootstrap
$ ./configure

If you wish to use supported system libraries do this instead.

$ ./configure --enable-external-libraries

In either case, with the above installed packages this should go smoothly :)

Build

$ make

Install

$ sudo make install

When this completes you are done!

You may either go into a terminal session or press <Alt>+<F2>. Then type 'xbmc'.

NOTE: On certain versions of Ubuntu, you may get a segmentation fault due to libcurl. This is resolved by creating a symbolic link in /usr/lib

$ cd /usr/lib
$ sudo ln -s libcurl-gnutls.so.4 libcurl.so.4

Startup Script

/etc/init.d/xbmc

#!/bin/sh
#/etc/init.d/xbmc

# starting Xorg and XBMC For Linux
case "$1" in
  start)
        xinit -display :0.1 -e xbmc-standalone &
        ;;
  stop)
        killall xbmc
        ;;

esac

exit 0

Auto Library Update

  • Cronjob to update library at noon and midnight every day if you leave your XBMC always on.
## Update XBMC Library
00 0,12 * * * curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)"

Xorg.conf

  • Fixed Dual Head Configuration
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 304.43  (buildd@lawrencium)  Tue Aug 28 03:15:40 UTC 2012

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 1440 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection 

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Pioneer Electronic Corporation VSX-1021"
    HorizSync       26.0 - 68.0
    VertRefresh     23.0 - 60.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "NOR LM-965WA"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 220"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 220"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection 

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0; CRT: nvidia-auto-select +0+0; CRT: 1440x900 +0+0; CRT:
 1440x900_60 +0+0; CRT: 1440x900_75 +0+0; CRT: 1152x864 +0+0; CRT: 1152x864_75 +0+0; CRT: 1024x768 +0+0; CRT: 1024x768_75 +0+0; CRT: 1024x768_70 +0+0; CRT: 1024x768_60 +0+0; CRT: 800x600 +0+0; CRT: 800x600_75 +0+0; CRT: 800x600_72 +0+0; CRT: 800x600_60 +0+0; CRT: 800x600_56 +0+0; CRT: 640x480 +0+0; CRT: 640x480_75 +0+0; CRT: 640x480_72 +0+0; CRT:
 640x480_60 +0+0; CRT: nvidia-auto-select @1440x720 +0+0; CRT: nvidia-auto-select @1440x810 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Lirc Hauppauge PVR250

In 12.04 we use devinput to catch IR, well my system changes the eventX input each time I reboot, so here is the automagic fix.
The following rule creates /dev/lirc0 to always point to the active IR device based upon "cat /proc/bus/input/devices"

  • Create -> /etc/udev/rules.d# more hauppuage.rules
KERNEL=="event[0-9]", ATTRS{name}=="*Hauppauge*", SYMLINK+="lirc0"
  • /etc/lirc/hardware.conf
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES=""
REMOTE_MODULES="ir-kbd-i2c"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
REMOTE_LIRCD_ARGS=""
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
START_LIRCD="true"
START_LIRCMD=""
LOAD_MODULES="true"
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"