From: Michael Mrozek Date: Tue, 6 Apr 2010 22:58:00 +0000 (+0200) Subject: first-run-wizard.sh: Changed to use gui.conf for GUI selection. X-Git-Tag: Release-2010-05/1~74 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bc901cc583ccd9cdec3f61b3c8f8e32b4bb2a22;p=openpandora.oe.git first-run-wizard.sh: Changed to use gui.conf for GUI selection. --- diff --git a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh old mode 100644 new mode 100755 index 3d78b79..3af9e0c --- a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh +++ b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh @@ -147,22 +147,20 @@ fi # Select the default interface and setup SLiM to pass that as a sesion to ~./.xinitrc -while ! launcher=$(zenity --height 260 --list --title="Default User Interface" --text="Please choose your default application launcher.\n\nYou can always change this setting later." --column "return" --print-column=1 --hide-column=1 --column "Pick a launcher" "xfce" "Desktop environment (Xfce)" "mmenu" "Very basic GUI (MiniMenu)" "pmenu" "Gaming-console like launcher (PMenu)" "netbooklauncher" "Netbook Launcher") || [ "x$launcher" = "x" ]; do - zenity --title="Error" --error --text="Please select a default launcher." --timeout 6 -done +selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --title="Select the Default GUI" --list --multiple --column "name" --column "description" --text "select defaultgui" ) +echo $selection + +gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}') +stopcommand=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $4}') -if [ $launcher == "xfce" ]; then -# sed -i 's/.*sessions .*/sessions xfce4,pmenu/g' /etc/slim.conf - sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startxfce4/g' /home/$username/.xinitrc - echo Xfce selected as default interface -elif [ $launcher == "pmenu" ]; then -# sed -i 's/.*sessions .*/sessions pmenu,xfce4/g' /etc/slim.conf - sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=pmenu/g' /home/$username/.xinitrc - echo PMenu selected as default interface -elif [ $launcher == "netbooklauncher" ]; then - sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startnetbooklauncher/g' /home/$username/.xinitrc -elif [ $launcher == "mmenu" ]; then - sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startmmenu/g' /home/$username/.xinitrc +echo $gui + +if [ $gui ]; then + sed -i "s/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=$gui/g" /home/$username/.xinitrc + echo $selection selected as default interface + zenity --info --title="Selected session" --text "You selected $selection as default setting. You can always change your default GUI later." --timeout 6 +else + sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startxfce4/g' /home/$username/.xinitrc fi # ----