#! /bin/sh # # Gtkdialog to execute program as root from a WM menu. # - SliTaz GNU/Linux 2008. # VERSION=20080113 # Usage. if [ -z "$1" ]; then echo "Slitaz subox version : $VERSION" echo -e "\nUsage : subox program\n" exit 0 fi # Nothing to do if we are root test $(id -u) = 0 && exec $1 # Keep command in an exported variable to be used by SU_DIALOG. export SU_CMD=$@ # Main window and root password default entry set to 'root'. export SU_DIALOG=' echo $SU_CMD root PASSWD ' gtkdialog --center --program=SU_DIALOG exit 0