Re: Why doesn't this sudo script using zenity work??
- From: Stefano Sabatini <stefano.sabatini-lala@xxxxxxxx>
- Date: Sun, 3 Dec 2006 15:41:58 +0100
On date Saturday 2006-12-02 20:16:06 +0100, Stefano Sabatini wrote:
I'm trying this script and it works both as a script launched from
gnome-terminal and when it's called by a gnome-panel launcher:
#! /bin/bash
# this forces the password typing, even in the case the sudo timeout has
# not yet expired
sudo -k
zenity --entry --title="Browse files as root" --text="Enter your password:" --hide-text \
| sudo -S nautilus --no-desktop --browser 1> /dev/null 2> /dev/null
if [ "$?" != 0 ]; then
zenity --error --text="Sorry, bad password"
return 1
fi
Oops, this is a mistake of mine:
replace "return 1" with "exit 1".
Cheers
--
Stefano Sabatini
Linux user number 337176 (see http://li.count.org)
_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list
- References:
- Why doesn't this sudo script using zenity work??
- From: William Case
- Re: Why doesn't this sudo script using zenity work??
- From: Stefano Sabatini
- Re: Why doesn't this sudo script using zenity work??
- From: William Case
- Re: Why doesn't this sudo script using zenity work??
- From: Stefano Sabatini
- Why doesn't this sudo script using zenity work??
- Prev by Date: Re: Folders like Desktop
- Next by Date: Re: Folders like Desktop
- Previous by thread: Re: Why doesn't this sudo script using zenity work??
- Next by thread: Re: I must be missing something...keystroke maneuvering between applications under different virtual desktops
- Index(es):