Install script for XBMC in Raspbian

# Install XBMC
sudo sh -c "echo 'deb http://archive.mene.za.net/raspbian wheezy contrib' > /etc/apt/sources.list.d/mene.list"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED
sudo apt-get update
sudo apt-get install xbmc

# Add input group if it doesn't exist
egrep -i "^input" /etc/group
if [ $? -ne 0 ]; then
    sudo addgroup --system input
fi

# Make keyboard work
sudo sh -c "echo 'SUBSYSTEM=="input", GROUP="input", MODE="0660"' > /etc/udev/rules.d/99-input.rules"
sudo sh -c "echo 'KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"' >> /etc/udev/rules.d/99-input.rules"

sudo sh -c "echo '# input' > /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo 'KERNEL=="mouse*|mice|event*",   MODE="0660", GROUP="input"' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo 'KERNEL=="ts[0-9]*|uinput",     MODE="0660", GROUP="input"' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo 'KERNEL=="js[0-9]*",             MODE="0660", GROUP="input"' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo '# tty' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo 'KERNEL=="tty[0-9]*",            MODE="0666"' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo '# vchiq' >> /etc/udev/rules.d/10-permissions.rules"
sudo sh -c "echo 'SUBSYSTEM=="vchiq",  GROUP="video", MODE="0660"' >> /etc/udev/rules.d/10-permissions.rules"

# Add current user to groups
$USER=`awk -F: "/:$(id -u):/{print $1}" /etc/passwd`
sudo usermod -a -G audio $USER
sudo usermod -a -G video $USER
sudo usermod -a -G input $USER
sudo usermod -a -G dialout $USER
sudo usermod -a -G plugdev $USER
sudo usermod -a -G tty $USER

# Enable autoboot and configure current user
sudo sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/xbmc
sudo sed -i 's/USER=xbmc/USER='"$USER"'/g' /etc/default/xbmc

xbmc-logo

Ref: http://michael.gorven.za.net/raspberrypi/xbmc

You might also like

Add Shutdown option to XBMC in Raspbian
When I installed XBMC in Raspbian I noticed that the shutdown menu only had the "Exit" button, which...

Fix no video problem in XBMC
Although is recommended using a dedicated media center distribution (raspbmc, openelec or xbian for example)...

Compile and install driver for TP-Link TL-WN725N version 2 in Raspbian
UPDATE: Read this post if you have another version of the kernel and want a script to compile the driver...

Adding custom action to a keycode in XBMC
There are some USB IR remotes out there specifically made to be used in media centers. I bought one of...

  1. johnsonld123

    Excellent!!!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.