All pastes #83661 Raw Edit

Someone

public text v1 · immutable
·published 2006-07-09 23:21 UTC
rendered paste body
#!/bin/bash
# xgl startup script by RiPz @ www.binary-pulse.co.uk
# GNU Public Licence
# woo!
# Edit: 20060301 Added xfce-svn CF (cOff3eBuZz www.tripthelihgt.net/xgloverlay)

echo "###### STARTXGL SCRIPT ######"

if [ "$1" = "" ]; then
    echo "Usage: startxgl <display number> <window manager> <gfx>"
    echo "<gfx> is optional, values 'ati' or 'nvidia/other', default is nvidia/other"
    echo "Window Managers currently supported: xfce, gnome."
elif [ "$2" = "" ]; then
    echo "Usage: startxgl <display number> <window manager> <gfx>"
    echo "<gfx> is optional, values 'ati' or 'nvidia/other', default is nvidia/other"
    echo "Window Managers currently supported: xfce, gnome."
else
    echo "Starting X Server with XGL"
    echo "   Using Display $1"
    echo "   Using WM: $2"

    if [ "$3" = "ati" ]; then
    	echo "   Using Card: ati"
    	Xgl :$1 -ac -accel xv:pbuffer -accel glx:pbuffer &
    else
	echo "   Using Card: nvidia/other"
	Xgl :$1 -ac -accel xv -accel glx:pbuffer &
    fi

    sleep 2
    echo "   Starting compiz"
    DISPLAY=:$1 LD_LIBRARY_PATH=/usr/lib/opengl/xorg-x11/lib/ compiz --replace gconf decoration wobbly fade minimise cube rotate zoom scale move resize place switcher &
    sleep 2

    echo "   Starting Window Manager"

    if [ "$2" = "gnome" ]; then
	DISPLAY=:$1 gnome-window-decorator &
	DISPLAY=:$1 /usr/libexec/gnome-settings-daemon &
	DISPLAY=:$1 nautilus -n --sync &
	DISPLAY=:$1 gnome-panel
    elif [ "$2" = "fluxbox" ]; then
	DISPLAY=:$1 gnome-window-decorator &
	DISPLAY=:$1 gnome-terminal &
        DISPLAY=:$1 exec fluxbox
    elif [ "$2" = "xfce" ]; then
	DISPLAY=:$1 xfce-mcs-manager
	DISPLAY=:$1 gnome-window-decorator &
	DISPLAY=:$1 xftaskbar4 &
	DISPLAY=:$1 xfdesktop &
	DISPLAY=:$1 exec xfce4-panel
    elif [ "$2" = "xfce-svn" ]; then
        DISPLAY=:$1 xfce-mcs-manager
        DISPLAY=:$1 gnome-window-decorator &
        DISPLAY=:$1 xfdesktop &
        DISPLAY=:$1 exec xfce4-panel

    fi
    
    echo "   DONE!"
fi