[PC-BSD Commits] r13694 - pcbsd/current/mfsroot-overlay/root

svn at pcbsd.org svn at pcbsd.org
Thu Nov 3 07:39:58 PDT 2011


Author: kris
Date: 2011-11-03 07:39:58 -0700 (Thu, 03 Nov 2011)
New Revision: 13694

Modified:
   pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh
Log:

Prompt for which desktop to run in LIVE mode




Modified: pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh
===================================================================
--- pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh	2011-11-03 14:22:58 UTC (rev 13693)
+++ pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh	2011-11-03 14:39:58 UTC (rev 13694)
@@ -29,7 +29,20 @@
 # Remove old .xinitrc
 rm /root/.xinitrc
 
-# Setup our script to start kde4 right away
+# Prompt for which desktop to run
+dialog --title "Select Desktop" --menu "Please select the desktop to load:" 12 30 15 KDE "KDE" GNOME "GNOME" LXDE "LXDE" XFCE "XFCE" 2>/tmp/UtilAnswer
+
+ANS="`cat /tmp/UtilAnswer`"
+
+case $ANS in
+       KDE) dCmd="startkde4";;
+     GNOME) dCmd="gnome-session";;
+      LXDE) dCmd="startlxde";;
+      XFCE) dCmd="startxfce4";;
+         *) dCmd="startlxde";;
+esac
+
+# Setup our script to start X right away
 echo "touch /tmp/.xstarted
 
 # Set the default cd mount point so we can install from live media
@@ -39,7 +52,7 @@
 # Turn off the numlock
 numlockx off
 
-/usr/local/bin/startkde4" >/root/.xinitrc
+/usr/local/bin/${dCmd}" >/root/.xinitrc
 
 # Set all NICS to DHCP
 echo "Detecting NICs..."



More information about the Commits mailing list