[PC-BSD Commits] r378 - in pcbsd/trunk/system-overlay/PCBSD/xorg-gui: bin conf

svn at pcbsd.org svn at pcbsd.org
Mon Jun 25 12:29:49 PDT 2007


Author: kris
Date: 2007-06-25 20:29:49 +0100 (Mon, 25 Jun 2007)
New Revision: 378

Modified:
   pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh
   pcbsd/trunk/system-overlay/PCBSD/xorg-gui/conf/ttys.xsetup
Log:

Changed the xorg config to now run on tty0, which lets the user see notifications about whats going on.

Also, the xorg gui now makes & saves a logfile in /PCBSD/tmp/xsetup.log



Modified: pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh	2007-06-25 15:15:57 UTC (rev 377)
+++ pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh	2007-06-25 19:29:49 UTC (rev 378)
@@ -1,9 +1,24 @@
 #!/bin/sh
+# xorg-gui startup script
+# Copyright 2007 PC-BSD Software
+# Descr: This script is called by /etc/ttys to run the first time X setup
+#        wizard. It allows the user to select a resolution / refresh rate and
+#        test it before continuing into the normal KDE GUI.
+###############################################################################
+# Configuration Settings
 
+# Set all our path variables
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin:/usr/local/sbin" ; export PATH
 
+# Set the home directory for startx to run properly
 HOME="/root" ; export HOME
 
+# Set the log file location
+XLOG="/PCBSD/tmp/xsetup.log" ; export XLOG
+
+###############################################################################
+# Start the script now
+
 echo "Please wait... Start X-Configuration Utility"
 
 # Check if we need to save an existing .xinitrc file
@@ -15,7 +30,8 @@
 # Check if we need to move the .fluxbox profile
 if [ -e "/root/.fluxbox" ]
 then
-  mv /root/.fluxbox /root/.fluxbox.xbak
+  rm -rf /root/.fluxbox.xbak 2>/dev/null
+  mv /root/.fluxbox /root/.fluxbox.xbak 2>/dev/null
 fi
 
 rm -rf /root/.fluxbox
@@ -29,67 +45,24 @@
    mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
 fi
 
+# Recreate our log file
+if [ -e "${XLOG}" ]
+then
+  mv ${XLOG} ${XLOG}.old
+fi
 
+# Create an empty log file for appending
+echo "" > ${XLOG}
+
+# Remove any files from a previous attempt
 rm /PCBSD/xorg-gui/.done >/dev/null 2>/dev/null
 rm /PCBSD/xorg-gui/.xsettings.sh >/dev/null 2>/dev/null
 rm /PCBSD/xorg-gui/.canceled >/dev/null 2>/dev/null
 rm /PCBSD/xorg-gui/.selected >/dev/null 2>/dev/null
 
+###############################################################################
+# Start the detection loop
 
-# Check if we need to run the initial auto-detection wizard
-#if [ ! -e "/PCBSD/xorg-gui/.skipauto" ]
-#then
-
-# Copy over the working xorg.conf file
-#cp /PCBSD/xorg-gui/conf/xorg.conf.basic /etc/X11/xorg.conf
-
-##### Create the xinitrc file
-#echo '#!/bin/sh
-#/usr/local/bin/fluxbox &
-#PID=$!
-#kdialog --msgbox "PC-BSD will now attempt to set your screen resolution.\nIf the screen fails to display, please wait 10 seconds, and you will be able to manually set the resolution."
-#kill -9 ${PID}
-#fi
-#' > /root/.xinitrc
-#chmod 755 /root/.xinitrc
-
-### Warn the user that we will attempt an auto-config
-#/usr/local/bin/startx
-
-#rm /etc/X11/xorg.conf
-#/PCBSD/xorg-gui/autoDetect/x_config.sh
-
-##### Create the xinitrc file
-#echo '#!/bin/sh
-#/usr/local/bin/fluxbox &
-#PID=$!
-#/PCBSD/xorg-gui/bin/XGUI -test
-#if [ "${?}" = "0" ]
-#then
-# echo "selected" > /PCBSD/xorg-gui/.selected
-#fi
-#kill -9 ${PID}
-#' > /root/.xinitrc
-#chmod 755 /root/.xinitrc
-
-### Now test the new resolution
-#/usr/local/bin/startx
-
-#if [ -e "/PCBSD/xorg-gui/.selected" ]
-#then
-
-  # Copy over the right ttys file now
-#  cp /PCBSD/xorg-gui/conf/ttys.normal /etc/ttys
-#  kill -HUP 1
-
-#  exit
-#fi
-
-#fi
-
-
-# Run the setup wizard allowing user to select their own resolution
-
 while
 i=1
 do
@@ -114,7 +87,7 @@
 fi
 kill -9 ${PID}
 ' > /root/.xinitrc
-  chmod 755 /root/.xinitrc
+chmod 755 /root/.xinitrc
 
 else
 
@@ -122,7 +95,7 @@
 echo '#!/bin/sh
 /usr/local/bin/fluxbox &
 PID=$!
-kdialog --msgbox "PC-BSD will now allow you to setup your monitor resolution and video settings.\n If your system is equipped with a nVidia video card, you may wish to select the nvidia driver on the advanced tab. This will enable you to run the 3D desktop, Beryl."
+kdialog --msgbox "PC-BSD will now allow you to setup your monitor resolution and video settings.\n If your system is equipped with a nVidia video card, you may wish to select the nvidia driver on the advanced tab. This will enable you to run the 3D desktop, Beryl.i\n\nNOTE: Beryl requires a color depth of 24."
 /PCBSD/xorg-gui/bin/XGUI
 kill -9 ${PID}
 if [ "$?" = "1" ]
@@ -136,8 +109,10 @@
 fi
 
 
+echo "Please wait... Starting X..."
+sleep 1
 # Start the X gui
-/usr/local/bin/startx
+/usr/local/bin/startx 2>>${XLOG}
 
 
 # The user canceled the dialog, and chose to use the default
@@ -150,10 +125,11 @@
 if [ -e "/PCBSD/xorg-gui/.xsettings.sh" ]
 then
 
-rm /PCBSD/xorg-gui/.selected
+rm /PCBSD/xorg-gui/.selected >/dev/null 2>/dev/null
 
 #### Create the new XF86Config file with the user settings
-/PCBSD/xorg-gui/bin/setupconf.sh
+echo "Generating new Xorg configuration file..."
+/PCBSD/xorg-gui/bin/setupconf.sh >>${XLOG} 2>>${XLOG}
 
 ##### Create the xinitrc file
 echo '#!/bin/sh
@@ -168,7 +144,9 @@
 ' > /root/.xinitrc
 chmod 755 /root/.xinitrc
 
-/usr/local/bin/startx
+echo "Please wait... Starting X..."
+sleep 1
+/usr/local/bin/startx 2>>${XLOG}
 
 fi
 
@@ -185,7 +163,7 @@
 # Copy over the right ttys file now
 cp /PCBSD/xorg-gui/conf/ttys.normal /etc/ttys
 
-rm /root/.xinitrc
+rm /root/.xinitrc >/dev/null 2>/dev/null
 # Check if we need to save an existing .xinitrc file
 if [ -e "/root/.xinitrc.xbak" ]
 then
@@ -195,9 +173,9 @@
 # Check if we need to move the .fluxbox profile
 if [ -e "/root/.fluxbox.xbak" ]
 then
-  rm -rf /root/.fluxbox
+  rm -rf /root/.fluxbox >/dev/null 2>/dev/null
   mv /root/.fluxbox.xbak /root/.fluxbox
 fi
 
-rm /PCBSD/xorg-gui/.skipauto
+rm /PCBSD/xorg-gui/.skipauto >/dev/null 2>/dev/null
 kill -HUP 1

Modified: pcbsd/trunk/system-overlay/PCBSD/xorg-gui/conf/ttys.xsetup
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/xorg-gui/conf/ttys.xsetup	2007-06-25 15:15:57 UTC (rev 377)
+++ pcbsd/trunk/system-overlay/PCBSD/xorg-gui/conf/ttys.xsetup	2007-06-25 19:29:49 UTC (rev 378)
@@ -32,11 +32,11 @@
 # when going to single-user mode.
 console	none				unknown	off secure
 #
-ttyv0	"/usr/libexec/getty Pc"		cons25	on  secure
+ttyv0	"/usr/libexec/getty xsetup"	cons25	on  secure
 # Virtual terminals
 ttyv1	"/usr/libexec/getty Pc"		cons25	on  secure
 ttyv2	"/usr/libexec/getty Pc"		cons25	on  secure
-ttyv3	"/usr/libexec/getty xsetup"	cons25	on  secure
+ttyv3	"/usr/libexec/getty Pc"		cons25	on  secure
 #ttyv4	"/usr/local/bin/kdm"		xterm	on  secure
 #ttyv4	"/usr/libexec/getty Pc"		cons25	on  secure
 #ttyv5	"/usr/libexec/getty Pc"		cons25	on  secure



More information about the Commits mailing list