#!/bin/bash ## detect_conf.sh : test de la config et choix ## alias xconf en user ## function etat() { grep "xconf" /etc/X11/xorg.conf | grep -v dexconf | grep -o ".\{7\}$" } echo "xorg.conf est en $(etat)" echo "Config OK ?" select conf in "Oui" "Non"; do if [ "$conf" = "Oui" ]; then startx exit elif [ "$conf" = "Non" ]; then su-to-root -c "sh /usr/local/bin/xconf.sh" startx exit fi break done exit 0