slitaz-tools rev 909
tazx: add slim-related menuitems
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Sun Oct 05 23:54:36 2014 +0000 (2014-10-05) |
parents | fade59ccdd1f |
children | 8d6054abc5ee |
files | tinyutils/tazx |
line diff
1.1 --- a/tinyutils/tazx Thu Oct 02 21:13:05 2014 +0000 1.2 +++ b/tinyutils/tazx Sun Oct 05 23:54:36 2014 +0000 1.3 @@ -165,9 +165,17 @@ 1.4 esac 1.5 } 1.6 1.7 +install_slim() { 1.8 + [ -d "$installed/slim" ] || tazpkg -gi slim 1.9 + [ -d "$installed/dbus" ] || tazpkg -gi dbus 1.10 +} 1.11 + 1.12 # Screen configuration dialog. TODO: menus items to enable/disable X on boot 1.13 # and sed /etc/rcS.conf to remove slim from RUN_DAEMONS. 1.14 config_dialog() { 1.15 + . /etc/rcS.conf ; LM="ON" 1.16 + [ $LOGIN_MANAGER = "slim" ] || LM="OFF" 1.17 + 1.18 exec 3>&1 1.19 value=$($DIALOG \ 1.20 --clear --colors \ 1.21 @@ -175,6 +183,8 @@ 1.22 --menu "" 16 72 10 \ 1.23 "xorg" "$(_n 'Install or reconfigure Xorg')" \ 1.24 "xorg-light" "$(_n 'Install Xorg server (light version)')" \ 1.25 + "onboot" "$(_n 'AutoStart Xorg by SLiM on boot') ...| $LM" \ 1.26 + "slim" "$(_n '(Re)Start Simple Login Manager now')" \ 1.27 "quit" "$(_n 'Quit Tazx utility')" \ 1.28 2>&1 1>&3) 1.29 retval=$? 1.30 @@ -196,6 +206,22 @@ 1.31 [ -d "$installed/xorg-xf86-video-fbdev" ] || \ 1.32 tazpkg -gi xorg-xf86-video-fbdev 1.33 xorg_conf_d ;; 1.34 + onboot) 1.35 + install_slim 1.36 + if [ $LM = "OFF" ] ; then 1.37 + LM=slim 1.38 + else 1.39 + LM="" 1.40 + fi 1.41 + sed '/LOGIN_MANAGER=/s|"\([^"]*\)"|"'$LM'"|' \ 1.42 + -i /etc/rcS.conf 1.43 + 1.44 + [ $LM = "slim" ] || LM=disabled 1.45 + echo "start X on boot:" $(boldify $LM) ;; 1.46 + slim) 1.47 + install_slim 1.48 + [ ! -z $XAUTHORITY ] || \ 1.49 + stopd slim ; sleep 1 ; startd slim ;; 1.50 *) 1.51 exit 0 ;; 1.52 esac