source: src-qt4/pc-xgui/resources/scripts/xinit-autodetect @ c174ffd

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since c174ffd was c174ffd, checked in by Kris Moore <kris@…>, 13 months ago

Fix a bug with xorg display wizard, we can skip restarting X if the user
likes the initial resolution

  • Property mode set to 100755
File size: 899 bytes
Line 
1#!/bin/sh
2
3# Source our functions
4. /usr/local/share/pcbsd/scripts/functions.sh
5
6# Set all our path variables
7PATH="/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin:/usr/local/sbin"
8export PATH
9
10if [ -e "/root/.xprofile" ]
11then
12. /root/.xprofile
13fi
14
15# Setting a language
16if [ -e "/etc/pcbsd-lang" ] ; then
17   LANG=`cat /etc/pcbsd-lang`
18   export LANG
19fi
20 
21# We started up, let the backend script know
22touch ${XGUITMP}/.xstartupsuccess
23
24# Start our fluxbox WM
25/usr/local/bin/startfluxbox &
26PID=$!
27
28# Ask user if they like the auto-detected resolution
29/usr/local/bin/pc-xgui -firstprompt
30if [ $? -eq 0 ] ; then
31  # The user liked this res? Lets run the other stuff now
32  touch ${XGUITMP}/.selected
33  run_firstboot
34  kill -9 ${PID}
35  exit 0
36fi
37
38# The user wants to setup a manual resolution
39/usr/local/bin/pc-xgui
40if [ $? -ne 0 ] ; then
41 echo "Canceled" > ${XGUITMP}/.canceled
42fi
43kill -9 ${PID}
Note: See TracBrowser for help on using the repository browser.