Ubuntu XBMC Install
Contents
XBMC Install with Natty 11.04
- this is cut n paste from notes
- do minimal Natty ISO install (20Mb image), choose account,password,machine name etc all as xbmc
- add openssl as only extra feature, makes it easier to config remotely later
sudo apt-get install python-software-properties pkg-config sudo add-apt-repository ppa:team-xbmc/ppa #change 2x natty to maverick sudo nano -w /etc/apt/sources.list.d/team-xbmc-ppa-natty.list sudo apt-get update sudo apt-get install xbmc xorg sudo apt-get install nvidia-glx-185 nvidia-settings mesa-utils libvdpau-dev sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf #allready done on natty install so will error, ignore sudo adduser xbmc --gecos XBMC #netdev etc will error, ignore #upd - maybe user usermod -a -G adm,sudo,cdrom,floppy,audio,video,plugdev,netdev,powerdev,fuse,polkituser xbmc instead to append to any you are allready in! sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,netdev,powerdev,fuse,polkituser xbmc sudo apt-get install xbmc-live #dont get pulseaudio, will cause alsactl store to not work sudo apt-get install alsa-utils #edit stuff with alsamixser if you want sudo alsamixer sudo alsactl store 0 sudo apt-get install upower acpi-support sudo apt-get install udisks usbmount sudo apt-get install ntfs-3g #add ntfs to the filesystem types so it can automount a NTFS usb stick, FILESYSTEMS="ntfs vfat ext2 ext3 ext4 hfsplus" sudo nano -w /etc/usbmount/usbmount.conf sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla #cut n paste stuff below into it [Actions for xbmc user] Identity=unix-user:xbmc Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.* ResultAny=yes ResultInactive=no ResultActive=yes sudo apt-get install lightdm-gtk-greeter edit /etc/lightdm/lightdm.conf [SeatDefaults] autologin-user=xbmc autologin-user-timeout=0 user-session=XBMC greeter-session=lightdm-gtk-greeter #if network not coming up, edit the /etc/udev/networks/ 70 somehting fiel and remove all references to network cards, will reconfigure on reboot. sudo apt-get install lirc # ##now N/A, sudo nano -w /etc/rc.local ##now N/A, add this line before exit 0, echo lirc > /sys/class/rc/rc0/protocols
fstab
#first entry is USB stick its booting from, next 3 are the 3 hdd's in the system UUID=10f4bfcd-9969-4685-9dab-0828407a31b0 / ext4 noatime,nodiratime,errors=remount-ro 0 1 UUID=2b209b3c-0b2a-459c-8cfb-03be28b8fa00 /media/2b209b3c-0b2a-459c-8cfb-03be28b8fa00 ext4 defaults,noatime,nodiratime 0 0 UUID=4d2a843a-3fb7-404a-a8e5-0a9649bdd282 /media/4d2a843a-3fb7-404a-a8e5-0a9649bdd282 ext4 defaults,noatime,nodiratime 0 0 UUID=52f6ba34-028a-4e86-8341-1d04e8092af2 /media/52f6ba34-028a-4e86-8341-1d04e8092af2 ext4 defaults,noatime,nodiratime 0 0 tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/lock tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/run tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/log/apt tmpfs defaults,noatime,mode=1777 0 0 aufs /media/tv aufs ro,br:/media/2b209b3c-0b2a-459c-8cfb-03be28b8fa00/tv=ro:/media/52f6ba34-028a-4e86-8341-1d04e8092af2/tv=ro:/media/4d2a843a-3fb7-404a-a8e5-0a9649bdd282/tv=ro 0 0 aufs /media/movies aufs ro,br:/media/2b209b3c-0b2a-459c-8cfb-03be28b8fa00/movies=ro:/media/52f6ba34-028a-4e86-8341-1d04e8092af2/movies=ro:/media/4d2a843a-3fb7-404a-a8e5-0a9649bdd282/movies=ro 0 0
lirc (ir blaster) lisend http://www.remotecentral.com/cgi-bin/mboard/rc-discrete/thread.cgi?6115 Power On Device Code: 00.02 Function: 00 0000 006D 0022 0002 0157 00AC 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0689 0157 0056 0015 0E94 Power Off Device Code: 00.02 Function: 03 0000 006D 0022 0002 0157 00AC 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0689 0157 0056 0015 0E94
asound multiple sound cards - http://www.alsa-project.org/main/index.php/Asoundrc#Virtual_multi_channel_devices - http://stuvel.eu/blog/tag/linux
see name/hardware ids of soundcards
$ cat /proc/asound/cards
See soundcard names
$ aplay -L
test sound works
$ aplay -D hw:Audigy21 /usr/share/sounds/alsa/Rear_Right.wav
fixup volume, F6 change through soundcards
$ sudo alsamixer
Audigy2 07:00.0 (top) (77% master) Audigy21 07:01.0 (bottom, richud.com) (85% master)
Output sound on two soundcards (headphones each), alter output levels on each to match headphones.
asound.conf
- Note this doesn't work anymore with Froyo, I imagine to do with Audioengine.
$ cat /etc/asound.conf pcm.!default { type plug slave { pcm "both" } } # This is the four-channel card that sends its first two channels # to one real card, and the other two channels to the other card. pcm.tworooms { type multi; slaves { a { # The first real card, change to "channel:CARD=CardName" # for your system. pcm hw:Audigy2; channels 2; } b { # The second real card, change to "channel:CARD=CardName" # for your system. pcm hw:Audigy21; channels 2; } } # This configures how the four channels of this virtual # card are distributed amongst the real cards. bindings { 0 { slave a; channel 0; } 1 { slave a; channel 1; } 2 { slave b; channel 0; } 3 { slave b; channel 1; } } } # This virtual "sound card" mixes two channels up to four. pcm.both { type route # Its four-channel output is sent to the "tworooms" device. slave { pcm "tworooms" } # This defines how the channels are mixed. Input channel 0 is # sent for 100% to channels 0 and 2 of device "tworooms", # and its channel 1 is sent for 100% to channels 1 and 3. ttable { 0 { 0 1.0; 2 1.0 } 1 { 1 1.0; 3 1.0 } } }
XBMC install with Ubuntu 13.10
- Install Ubuntu 13.10 server edition with no extras
- Set both user & pass as xbmc from install to keep inline with liveCD
- Entire install of Ubuntu+xbmc should be ~1.5Gb in total
#install extra bits, select correct remote on lirc ncurses menu (See below) sudo aptget install xbmc xorg lightdm-gtk-greeter usbmount udisks upower alsa-base lirc openssh-server #add 3rd party graphics drivers etc for VDPAU #sudo apt-get install nvidia-current-updates #get root sudo -i #enable audio alsactl init #add auto login for user xbmc echo -e "autologin-user=xbmc\nautologin-user-timeout=0\nuser-session=xbmc\n" >> /etc/lightdm/lightdm.conf #add ntfs to automount sed -i "s/vfat/ntfs vfat/" /etc/usbmount/usbmount.conf #stop grub halting boot after problem echo 'GRUB_RECORDFAIL_TIMEOUT="10"' >> /etc/default/grub
What the bits do
GUI needs xbmc xorg lightdm-gtk-greeter
usbmount mounts USB devices
udisks makes auto mounted things appear in XBMC
upower lets user shutdown (otherwise drops to X on shutdown)
openssh-server will let you access the box remotely (say you don't have a keyboard on it)
alsa-utils provides alsactl to enable audio
lirc for remote to work properly (instead of using built in kernel keyboard emulation, below) , using Lirc should you need to change any buttons they are mapped in /usr/share/xbmc/system/Lircmap.xml (but you shouldnt)
using kernel IR instead of lirc (not recommended)
You can use built in kernel support only but it leads to multiple problems. Rather than acting as a 'remote' its purely acting as a keyboard, so XBMC only sees it as a keyboard!
Firstly you need this little program to see what remote is doing.
sudo apt-get install ir-keytable
So for example with a Windows Media Centre remote (mce), note xbmc is ONLY seeing keyboard input
- to edit any buttons , edit (file obv. being for your remote) /lib/udev/rc_keymaps/rc6_mce
- to edit buttons corresponding input in xbmc edit /usr/share/xbmc/system/keymaps/keyboard.xml
e.g. run this to show what buttons are doing
ir-keytable -tv
Press 'power', 'ok', 'back' for example
You will see 'ok' is KEY_OK , which is useless because there isn't an OK key on the keyboard and hence does nothing in XBMC, You need to change these to the nearest keyboard key, and/or edit keyboard.xml to fit as best you can.
Edit /lib/udev/rc_keymaps/rc6_mce , change KEY_OK to be KEY_ENTER, whatever the power key does on yours to KEY_END, back button to ...
Enter is a perfect match for OK so that is fine, but problems then occur with others, so power is now mapped to nearest keyboard key, 'End', however to shutdown (in XBMC > 11 ?) you need ctrl-end so you need to edit /usr/share/xbmc/system/keymaps/keyboard.xml , change <end>LastPage</end> does to <end>XBMC.Shutdown()</end> . As you start mapping and fiddling about you will realise that just installing lirc is in fact far simpler as it will just 'work'.
Comments
blog comments powered by Disqus