#!/bin/bash
if [ `whoami` != "root" ]; then
echo "You must run this script as root.";
else
cp /etc/apt/sources.list /etc/apt/sources.list.backup.beryl-script
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.beryl-script
echo "deb
http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable" >> /etc/apt/sources.list
wget
http://nvidia.limitless.lupine.me.uk/ubuntu/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y install linux-restricted-modules-$(uname -r) nvidia-glx
nvidia-xconfig --add-argb-glx-visuals
echo "deb
http://ubuntu.beryl-project.org/ edgy main" >> /etc/apt/sources.list
wget
http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y dist-upgrade
aptitude -y install beryl emerald emerald-themes
echo "[Desktop Entry]
Encoding=UTF-8
Name=Beryl Manager
GenericName=3D Window Manager
Comment=Beryl Manager daemon
Icon=/usr/share/icons/hicolor/scalable/apps/beryl-manager.svg
Exec=beryl-manager
Terminal=false
Type=Application
Categories=GTK;GNOME;Application;Utility;
StartupNotify=true
X-Ubuntu-Gettext-Domain=beryl-manager" | sudo tee /etc/xdg/autostart/beryl-manager.desktop
sudo cp /etc/xdg/autostart/beryl-manager.desktop /usr/share/applications/beryl-manager.desktop
cp /etc/xdg/autostart/beryl-manager.desktop ~/Desktop/beryl-manager.desktop
echo -e "\n\nBeryl is now installed.\n\nTo run Beryl on Ubuntu startup, please add beryl-manager to your\nstartup programs (System > Preferences > Sessions, and click on\nthe \"startup programs\" tab). Afterwards, please reboot.\n\nBackups of /etc/apt/sources.list and /etc/X11/xorg.conf were made:\n /etc/apt/sources.list.backup.beryl-script\n /etc/X11/xorg.conf.backup"
fi;