User Tools

Site Tools


xbmc

This is an old revision of the document!


XBMC

Installeer Ubuntu met de minimal 9.10 ISO, selecteer bij de installatie alleen SSH server

Set IP to static

mcedit /etc/network/interfacec

zet hier het volgende in, dit zal het IP automatisch zetten, en de nic op 100mbit full duplex forceren

auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254
pre-up /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off
up /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off

add the deb's to the 3rd party sources.list

mcedit /etc/apt/sources.list.d/xbmc.org.list

zet hier het volgende in :

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

Importeer de bijbehorende GPA keys

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 64234534

update and upgrade the latest PPA's

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xbmc samba ethtool lirc lm-sensors mc xinit x11-xserver-utils binutils build-essential alsa unclutter

Install Nvidia Drivers

wget http://us.download.nvidia.com/XFree86/Linux-x86/195.30/NVIDIA-Linux-x86-195.30-pkg1.run
sh NVIDIA-Linux-x86-195.30-pkg1.run

maak een valid X11 config aan

mcedit /etc/X11/xorg.conf

En zet hiet het volgende in

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder63)  Sun Nov 22 18:17:43 PST 2009

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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 "Extensions"
    Option         "Composite" "Disable"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Option         "HWCursor" "False"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    Option         "DynamicTwinView" "False"
    DefaultDepth    24
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       16
        modes      "1280x720"
    EndSubSection
    SubSection     "Display"
        Depth       24
        modes      "1280x720"
    EndSubSection
    SubSection     "Display"
        Depth       32
        modes      "1280x720"
    EndSubSection
EndSection

Samba Configureren

Maak een /etc/samba/smb.conf aan

mcedit /etc/samba/smb.conf

en zet hier het volgende in

#======================= Global Settings =====================================
[global]
   workgroup = Blaat
   server string = ""
   security = user
   load printers = no
   map to guest = Bad Password
   map to guest = Bad User
   guest ok = yes
   encrypt passwords = true
   socket options = TCP_NODELAY 

   log file = /var/log/samba/samba.%m
   max log size = 50

   local master = no
   os level = 2
   domain master = no
   preferred master = no

   wins support = yes
   name resolve order = wins lmhosts host bcast

LIRC Configureren

Maak een /etc/lirc/hardware.conf aan

mcedit /etc/lirc/hardware.conf

en zet hier het volgende in

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Home-brew (16x50 UART compatible serial port)"
REMOTE_MODULES="lirc_dev lirc_serial"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

Maak een /etc/lirc/lircd.conf aan

mcedit /etc/lirc/lircd.conf

en zet hier het volgende in

#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.

#No default remote configuration was included for Home-brew (16x50 UART compatible serial port)
#You will need to include your own custom configuration for
#this remote, and file a bug at https://bugs.launchpad.net/ubuntu/+source/lirc/+filebug

begin remote

name Harmony
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

header 9036 4442
one 610 1620
zero 610 511
ptrail 610
repeat 9032 2187
pre_data_bits 16
pre_data 0x77E1
gap 107881
min_repeat 4
toggle_bit_mask 0x0

begin codes
Up 0xD069
Down 0xB069
Left 0x1069
Right 0xE069
Ok 0x2069
ChannelUp 0x5079
ChannelDown 0x3079
VolumeUp 0x5019
VolumeDown 0x3019
1 0x50E9
2 0x30E9
3 0x90E9
4 0x60E9
5 0x9019
6 0x6019
7 0x1099
8 0xE099
9 0x1059
0 0xE059
Clear 0x2059
Enter 0x4099
Red 0x10F9
Green 0xE0F9
Yellow 0x20F9
Blue 0x40F9
Mute 0xA019
Back 0xA019
Exit 0x50D9
Guide 0xA0B9
Menu 0x4069
Info 0xD099
Rec 0x30D9
Rew 0xD059
Fwd 0xB059
Pause 0xC019
Play 0xC0E9
Skip 0xB005
Replay 0xD005
Stop 0xA0E9
Prev 0xB099
Aspect 0x50B9
F1 0x90D9
F10 0x6079
F11 0xA079
F12 0xC079
F13 0x90B9
F14 0x60B9
F2 0x60D9
F3 0xA0D9
F4 0xC0D9
F5 0x1005
F6 0xE005
F7 0x2005
F8 0x4005
F9 0x9079
LargeDown 0xB0F9
LargeUp 0xD0F9
PwrToggle 0xC0B9
Queue 0x30B9
Sleep 0x4059
end codes
end remote 

Om XBMC goed te laten reageren op de lirc commando's moet je de XBMC lirc map aanpassen Maak een /home/xbmc/.xbmc/userdata/lircmap.xml aan

mcedit /home/xbmc/.xbmc/userdata/lircmap.xml

en zet hier het volgende in

<lircmap>
  <remote device="Harmony">
    <Up>Up</Up>
    <Down>Down</Down>
    <Left>Left</Left>
    <Right>Right</Right>
    <Select>Ok</Select>
    <Back>Prev</Back>
    <ChannelPlus>ChannelUp</ChannelPlus>
    <ChannelMinus>ChannelDown</ChannelMinus>
    <VolumePlus>VolumeUp</VolumePlus>
    <VolumeMinus>VolumeDown</VolumeMinus>
    <Star>Clear</Star>
    <Hash>Enter</Hash>
    <Red>Red</Red>
    <Green>Green</Green>
    <Yellow>Yellow</Yellow>
    <Blue>Blue</Blue>
    <Mute>Mute</Mute>
    <Back>Back</Back>
    <obc1>Exit</obc1>
    <Guide>Guide</Guide>
    <Menu>Menu</Menu>
    <obc101>Info</obc101>
    <Record>Rec</Record>
    <Reverse>Rew</Reverse>
    <Forward>Fwd</Forward>
    <Pause>Pause</Pause>
    <Play>Play</Play>
    <SkipMinus>Skip</SkipMinus>
    <SkipPlus>Replay</SkipPlus>
    <Stop>Stop</Stop>
    <obc2>Aspect</obc2>
    <MyMusic>F1</MyMusic>
    <obc11>F10</obc11>
    <obc12>F11</obc12>
    <obc13>F12</obc13>
    <obc103>F13</obc103>
    <obc102>F14</obc102>
    <MyVideo>F2</MyVideo>
    <MyTV>F3</MyTV>
    <obc6>F4</obc6>
    <obc7>F5</obc7>
    <obc16>F6</obc16>
    <obc5>F7</obc5>
    <obc9>F8</obc9>
    <obc10>F9</obc10>
    <LargeDown>LargeDown</LargeDown>
    <LargeUp>LargeUp</LargeUp>
    <obc100>PwrToggle</obc100>
    <obc3>Queue</obc3>
    <obc4>Sleep</obc4>
    <One>1</One>
    <Two>2</Two>
    <Three>3</Three>
    <Four>4</Four>
    <Five>5</Five>
    <Six>6</Six>
    <Seven>7</Seven>
    <Eight>8</Eight>
    <Nine>9</Nine>
    <Zero>0</Zero>
  </remote>
</lircmap> 

Maak een /home/xbmc/.xbmc/userdata/keymaps/Harmony.xml aan

mcedit /home/xbmc/.xbmc/userdata/keymaps/Harmony.xml

en zet hier het volgende in

<keymap>
  <Global>
    <universalremote>          
 	<obc100>XBMC.ShutDown()</obc100>
	<obc101>ContextMenu</obc101>
       <obc102>XBMC.EjectTray()</obc102>
       <obc103>PreviousMenu</obc103>
    </universalremote>
  </Global>
  <FullscreenVideo>
    <universalremote>          
 	<obc100>XBMC.ShutDown()</obc100>
	<obc101>ContextMenu</obc101>
       <obc102>XBMC.EjectTray()</obc102>
       <obc103>PreviousMenu</obc103>
    </universalremote>
  </FullscreenVideo>
</keymap>

XBMC configureren

CPU/GPU temp

Maak een /home/xbmc/.xbmc/userdata/advancedsettings.xml aan

mcedit /home/xbmc/.xbmc/userdata/advancedsettings.xml

en zet hier het volgende in

<advancedsettings>
  <cputempcommand>echo "$(sensors -u | tail -n4 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
  <gputempcommand>echo "$(nvidia-settings -tq gpuCoreTemp) C"</gputempcommand> 
</advancedsettings> 

Eject Knop

Maak een /home/xbmc/.xbmc/userdata/keymaps/Harmony.xml aan

mcedit /home/xbmc/.xbmc/userdata/keymaps/Harmony.xml

en zet hier het volgende in

<keymap>
  <Global>
    <keyboard>
      <f12>XBMC.EjectTray()</f12>
    </keyboard>
  </Global>
</keymap>

Autostart

Maak een /etc/init.d/xbmc aan

mcedit /etc/init.d/xbmc

en zet hier het volgende in

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

. /lib/lsb/init-functions

case "$1" in
  start)
        log_action_begin_msg "Starting XBMC"

        # if usplash is running, make sure to stop it now, yes "start" kills it.
        if pidof usplash > /dev/null; then
                DO_NOT_SWITCH_VT=yes /etc/init.d/usplash start
        fi
        /usr/bin/unclutter &
        /usr/bin/runXBMC.sh &

        log_action_end_msg 0
        ;;
  stop)
        killall Xorg xbmc
        ;;

esac

exit 0

Maak een /usr/bin/runXBMC.sh aan

mcedit /usr/bin/runXBMC.sh

en zet hier het volgende in

#!/bin/bash

if [ "$(pidof X)" ] ; then
	/usr/share/xbmc/xbmc.bin  --standalone
	exit
fi

while true
do
	echo "#!/bin/bash" >  /home/xbmc/.xsession
#	echo "/usr/share/xbmc/xbmc.bin  --standalone" >>  /home/xbmc/.xsession
	echo "/usr/bin/xbmc  --standalone" >>  /home/xbmc/.xsession

	echo "case \"\$?\" in" >>  /home/xbmc/.xsession
	echo "    0 ) # Quit" >>  /home/xbmc/.xsession
	echo "        touch /tmp/noRestartXBMC" >> /home/xbmc/.xsession
	echo "        break ;;"  >>  /home/xbmc/.xsession
	echo "    64 ) # Shutdown System"  >>  /home/xbmc/.xsession
	echo "        sleep 10 ;;"  >>  /home/xbmc/.xsession
	echo "    65 ) # Warm Reboot"  >>  /home/xbmc/.xsession
	echo "        echo "Restarting XBMC ..." ;;"  >>  /home/xbmc/.xsession
	echo "    66 ) # Reboot System"  >>  /home/xbmc/.xsession
	echo "        sleep 10 ;;"  >>  /home/xbmc/.xsession
	echo "     * ) ;;"  >>  /home/xbmc/.xsession
	echo "esac"  >>  /home/xbmc/.xsession

	chown xbmc:xbmc /home/xbmc/.xsession

	if [ "$(whoami)" == "root" ] ; then
		su xbmc -c "startx -- -br > /dev/null 2>&1" -l
	else
		startx -- -br > /dev/null 2>&1
	fi

	if [ -e /tmp/noRestartXBMC ] ; then
		rm /tmp/noRestartXBMC
		rm /home/xbmc/.xsession
		break
	fi

#	sleep 2
done

maak beide bestanden uitvoerbaar

chmod +x /usr/bin/runXBMC.sh
chmod +x /etc/init.d/xbmc

en zet het init.d script op autostart

update-rc.d xbmc default
xbmc.1266926738.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki