Atelier LoLiGrUB du 21 avril 2012
pour redémarrer le gestionnaire :
sudo gdm restart
pour $ .bash_profile (sur Archlinux)
if [[ -t 0 && $(tty) =~ /dev/tty ]] && ! pgrep -u $USER startx &> /dev/null;then echo " " echo "Aucune session X11 détectée, voulez vous en lancer une ?" echo "[a]ncienne [n]ouvelle [c]console" read -n 1 start_x if [[ $start_x == "a" ]];then startx elif [[ $start_x == "c" ]];then echo "X11 ne sera pas lancé." else echo " " echo " LXDE = 1" echo " XFCE = 2" echo " Fluxbox = 3" echo " Awesome = 4" echo " e17 = 5" read -n 1 start_x echo "#!/bin/bash" >.xinitrc echo "numlockx on &" >>.xinitrc if [[ $start_x == "1" ]];then echo "exec ck-launch-session startlxde" >>.xinitrc startx elif [[ $start_x == "2" ]];then echo "exec ck-launch-session startxfce4" >>.xinitrc startx elif [[ $start_x == "3" ]];then echo "exec startfluxbox" >>.xinitrc startx elif [[ $start_x == "4" ]];then echo "exec awesome" >>.xinitrc startx elif [[ $start_x == "5" ]];then echo "exec enlightenment_start" >>.xinitrc startx fi fi fi