Ask user to confirm

Ken Moffat kmoffat at drizzle.com
Tue Jan 20 01:27:29 CET 2004


Jack Coates wrote:

>#!/bin/sh
>
>export DISPLAY=":0.0"
>RESULTS=`Xdialog --screen-center --default-no --yesno "The system is
>about to shut down, do you want to continue?" 10 50`
>EXIT_CODE=$?
>case $EXIT_CODE in
>        0) /sbin/halt
>        ;;
>        1) exit
>        ;;
>        255) exit
>        ;;
>esac
>
>  
>
> [jack at chupacabra jack]$ cat /usr/local/sbin/halt-dialog

root at noisy:/home/ken# sh halt-dialog.sh
haltdialog.sh: line 1: Xdialog: command not found


??

Ken





More information about the Xfce mailing list