Skip to content

Instantly share code, notes, and snippets.

@un1versal
Last active February 17, 2016 06:36
Show Gist options
  • Save un1versal/7734643 to your computer and use it in GitHub Desktop.
Save un1versal/7734643 to your computer and use it in GitHub Desktop.
This is a quick Guide only to configuring Linux + xbmc compiled from github.

Quick guide to installing XBMC on Ubuntu 12.04LTS

Step 1 Install Ubuntu minimal 12.04LTS on your HTPC machine...

i386: http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/mini.iso

x64: http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/mini.iso

Note


  • Make sure you installed your Ubuntu minimal with xbmc user, creating user after running these commands is a BAD idea.
  • Make sure that xbmc user is part of sudo group logn as root user to do that and then logout and login into xbmc ussr to run commands below.
  • This is copy and paste line by line, you will learn about Linux in this process!!
  • Hint - Read the ## lines to know what the commands do.
  • Dont copy and paste the whole lot it wont work.
  • This is not a script.

sudo mkdir /home/setup
cd /home/setup
## "Install required packages"
sudo apt-get install pastebinit python-software-properties pkg-config -y
sudo apt-get install xinit policykit-1 upower udisks acpi-support -y
## "Add xbmc user to sudo"
sudo usermod -a -G sudo xbmc
## "Add xbmc user to required groups"
sudo usermod --group sudo,cdrom,audio,video,plugdev,fuse xbmc > /dev/null 2>&1
# sudo adduser xbmc users > /dev/null 2>&1
## "Enabling powercontrol"
wget -q https://raw.github.com/uNiversaI/xbmc-ubuntu-minimal/master/12.04/download/custom-actions.pkla -O /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
## "Enabling remote wakeup"
wget https://raw.github.com/uNiversaI/xbmc-ubuntu-minimal/master/12.04/download/remote_wakeup_rules -O /etc/udev/rules.d/90-enable-remote-wakeup.rules
## "Fixing usb mounting"
echo "usb-storage" | sudo tee -a /etc/modules > /dev/null 2>&1
## "Fix eject on xbmc"
wget https://gist.github.com/uNiversaI/9290192/raw -O /etc/udev/rules.d/60-cdrom_id.rules
## "Enabling XBMC nice levels"
echo "xbmc - nice -1" >> /etc/security/limits.conf > /dev/null 2>&1
## "The Environment is set to en_GB So if your somewhere else edit this for e.g US is en_US.UTF8
mv /etc/environment /etc/environment.bak
echo "LC_MESSAGES=\"C\"" | sudo tee -a /etc/environment > /dev/null 2>&1
echo "LC_ALL=\"en_GB.UTF-8\"" | sudo tee -a /etc/environment > /dev/null 2>&1
## "Installing audio"
sudo apt-get install alsa-utils libasound2 -y
## "The amixer stuff unmutes devices and is only for ION1, other cards may require other unmuting settings."
amixer -q set Master 100% unmute
amixer -q set PCM 100% unmute
amixer -q set 'IEC958',1 unmute
alsactl store
##You can add a XBMC ppa or compile XBMC from source I compile from source but mind the script disables some things on configure here.
#add-apt-repository ppa:team-xbmc/xbmc-nightly
#add-apt-repository ppa:team-xbmc/ppa
## "This Downloads a git compile script and installs all build deps and compiles XBMC from source"
wget https://gist.github.com/uNiversaI/8961332/raw -O ~/gcs.sh
sudo chmod 755 gcs.sh
sudo ./gcs.sh upgrade && exit 0 > /dev/null 2>&1
## "Installing x-swat ppa and newer video drivers, in Ubuntu 12.04LTS you can skip this."
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates -y
sudo apt-get update
## "Installing nvidia drivers you cannot skip this"
sudo apt-get install nvidia-current nvidia-settings libvdpau1 -y
sudo bash -c "echo allowed_users=anybody" >> /etc/X11/Xwrapper.config > /dev/null 2>&1
## "This adds a xorg.conf specifically for ION1 + Samsung 1080p TV"
sudo wget http://pastebin.com/raw.php?i=Hv5VMctd -O /etc/X11/xorg.conf
sudo apt-get install lm-sensors -y
sudo yes "" | sensors-detect
## "This actually add chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*" correct module to finish sensors-detect automatic deployment"
echo "w83627ehf" | sudo tee -a /etc/modules > /dev/null
## "sensors3.conf is exclusive to ION1"
mv /etc/sensors3.conf /etc/sensors3.conf.bak
wget https://gist.github.com/uNiversaI/8314703/raw -O /etc/sensors3.conf
sudo sensors -u && sensors -s
## "This add a upstart xbmc.conf so XBMC autostarts on boot"
wget https://gist.github.com/uNiversaI/8314666/raw -O /etc/init/xbmc.conf
## "This Fixes and removes apparmor as it may interfere with setup"
sudo service apparmor stop > /dev/null &2>1
sudo service apparmor teardown > /dev/null &2>1
sudo update-rc.d -f apparmor remove > /dev/null &2>1
sudo apt-get remove --purge apparmor -y > /dev/null &2>1
## "This fixes rsyslog after apparmor removal so we get back system logging"
mv /etc/init/rsyslog.conf /etc/init/rsyslog.conf.bak
wget https://raw.github.com/uNiversaI/xbmc-ubuntu-minimal/master/12.04/download/rsyslog.conf -O /etc/init/rsyslog.conf
## "This is a cleanup"
sudo apt-get -y autoremove > /dev/null 2>&1
sudo apt-get -y autoclean > /dev/null 2>&1
sudo apt-get -y clean > /dev/null 2>&1
## "This installs lirc and that it"
apt-get -y install lirc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment