#!/bin/bash # The following script automatically installs the XGL window manager with Beryl # support, and the Emerald theme in Ubuntu Edgy 6.10. # Gabriel I. Dain, 2007 REP = "deb http://ubuntu.beryl-project.org/ edgy main" APP_URL = "http://ubuntu.beryl-project.org/root@lupine.me.uk.gp" ROOT_UID = 0 # Root has $UID 0. STARTXGL1 = "#!/bin/sh" STARTXGL2 = "Xgl -fullscreen -ac -br -accel glx:pbuffer -accel xv:pbuffer &" STARTXGL3 = "sleep 4" STARTXGL4 = "export DISPLAY=:1" STARTXGL5 = "exec dbus-launch --exit-with-session gnome-session" XGL_DESKTOP1 = "[Desktop Entry]" XGL_DESKTOP2 = "Encoding=UTF-8" XGL_DESKTOP3 = "Name=Xgl" XGL_DESKTOP4 = "Exec=/usr/local/bin/startxgl.sh" XGL_DESKTOP5 = "Icon=" XGL_DESKTOP6 = "Type=Application" if [ "$UID" -ne "$ROOT_UID" ] then echo; echo "You must be root to run this script."; echo exit fi glxinfo | grep -q "direct rendering: Yes"; if [ $? -ne 0 ] then echo "Your graphics card doesn't have support for direct rendering." echo; echo "The script will now exit." exit fi echo "$REP" | cat >> /etc/apt/sources.list wget -q "$APP_URL" -O- | apt-key add -; apt-get update; apt-get -y dist-upgrade apt-get -y install xserver-xgl beryl emerald-themes echo "$STARTXGL1" | cat >> /usr/local/bin/startxgl.sh echo "$STARTXGL2" | cat >> /usr/local/bin/startxgl.sh echo "$STARTXGL3" | cat >> /usr/local/bin/startxgl.sh echo "$STARTXGL4" | cat >> /usr/local/bin/startxgl.sh echo "$STARTXGL5" | cat >> /usr/local/bin/startxgl.sh chmod a+x /usr/local/bin/startxgl.sh echo "$XGLDESKTOP1" | cat >> /usr/share/xsessions/xgl.desktop echo "$XGLDESKTOP2" | cat >> /usr/share/xsessions/xgl.desktop echo "$XGLDESKTOP3" | cat >> /usr/share/xsessions/xgl.desktop echo "$XGLDESKTOP4" | cat >> /usr/share/xsessions/xgl.desktop echo "$XGLDESKTOP5" | cat >> /usr/share/xsessions/xgl.desktop echo "$XGLDESKTOP6" | cat >> /usr/share/xsessions/xgl.desktop