slitaz-tools diff tinyutils/tazx @ rev 450

tazx: update for Xorg now installed by default
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 21 12:32:18 2010 +0100 (2010-03-21)
parents 60c17a765020
children d2c5ec45b766
line diff
     1.1 --- a/tinyutils/tazx	Thu Jan 07 00:39:20 2010 +0100
     1.2 +++ b/tinyutils/tazx	Sun Mar 21 12:32:18 2010 +0100
     1.3 @@ -4,13 +4,13 @@
     1.4  # This tinyutils is part of slitaz-tools. Tazx can configure Xvesa kdrive
     1.5  # and Xorg with several Window Manager.
     1.6  #
     1.7 -# (c) 2009 SliTaz GNU/Linux - GNU gpl v3.
     1.8 +# (c) 2010 SliTaz GNU/Linux - GNU gpl v3.
     1.9  # Authors: Christophe Lincoln <pankso@slitaz.org>
    1.10  #          Pascal Bellard <pascal.bellard@slitaz.org>
    1.11  #
    1.12  : ${DIALOG=tazdialog}
    1.13  
    1.14 -# Default value.
    1.15 +# Default value fo Xvesa.
    1.16  XSERVER=Xvesa
    1.17  KEYBD=keyboard
    1.18  MOUSE=mouse,5,/dev/input/mice
    1.19 @@ -159,18 +159,33 @@
    1.20  screen_config_dialog()
    1.21  {
    1.22  	exec 3>&1
    1.23 -	value=`$DIALOG \
    1.24 -		--clear --colors \
    1.25 -		--title " Configure X " \
    1.26 -		--menu \
    1.27 -	"The 'tazx' application helps you to configure your X session.\n\
    1.28 -	Window Manager : \Z2$WM\Zn" 16 70 5 \
    1.29 -	$(Xvesa -listmodes 2>&1 | grep ^0x | awk '{ printf "%s %s\n",$2,$3 }' | sort -nr | grep x[1-2][4-6]) \
    1.30 -	"xterm" "800x600x16" \
    1.31 -	"xorg" "Install Xorg" \
    1.32 -	"text" "Disable X autostart" \
    1.33 -	"quit" "Quitter" \
    1.34 -	2>&1 1>&3`
    1.35 +	if [ -x /usr/bin/Xvesa ]; then
    1.36 +		value=`$DIALOG \
    1.37 +			--clear --colors \
    1.38 +			--title " Configure X " \
    1.39 +			--menu \
    1.40 +		"The 'tazx' application helps you to configure your X session.\n\
    1.41 +		Window Manager : \Z2$WM\Zn \n\
    1.42 +		X server : \Z2Xvesa\Zn" 16 70 5 \
    1.43 +		$(Xvesa -listmodes 2>&1 | grep ^0x | awk '{ printf "%s %s\n",$2,$3 }' | sort -nr | grep x[1-2][4-6]) \
    1.44 +		"xterm" "800x600x16" \
    1.45 +		"xorg" "Install or reconfigure Xorg" \
    1.46 +		"text" "Disable X autostart" \
    1.47 +		"quit" "Quit Tazx utility" \
    1.48 +		2>&1 1>&3`
    1.49 +	else
    1.50 +		value=`$DIALOG \
    1.51 +			--clear --colors \
    1.52 +			--title " Configure X " \
    1.53 +			--menu \
    1.54 +		"The 'tazx' application helps you to configure your X session.\n\
    1.55 +		Window Manager : \Z2$WM\Zn \n\
    1.56 +		X server : \Z2Xorg\Zn" 16 70 5 \
    1.57 +		"xorg" "Install or reconfigure Xorg" \
    1.58 +		"text" "Disable X autostart" \
    1.59 +		"quit" "Quit Tazx utility" \
    1.60 +		2>&1 1>&3`
    1.61 +	fi
    1.62  	retval=$?
    1.63  	exec 3>&-
    1.64  	# Continue, exit or help...
    1.65 @@ -193,6 +208,7 @@
    1.66  		xorg)
    1.67  			install_xorg ;;
    1.68  		xterm)
    1.69 +			# Only with Xvesa
    1.70  			Xvesa -ac -shadow -screen 800x600x16 -br &
    1.71  			exec xterm -cr orange -geometry 80x35+0-0 ;;
    1.72  		text)
    1.73 @@ -374,11 +390,11 @@
    1.74  # ~/.xsession: Start X window session manually on your system (startx).
    1.75  #
    1.76  _EOF_
    1.77 -	if [ "$XSERVER " == "Xorg" ]; then
    1.78 +	if [ -x /usr/bin/Xorg ]; then
    1.79  		echo 'Xorg &' >> $HOME/.xsession
    1.80  	else
    1.81  		cat >> $HOME/.xsession << _EOT_
    1.82 -$XSERVER -ac -shadow $XSEVER_OPTS \\
    1.83 +Xvesa -ac -shadow $XSEVER_OPTS \\
    1.84  	-screen $NEW_SCREEN \\
    1.85  	-keybd $KEYBD \\
    1.86  	-mouse $MOUSE &