|
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 |