Re: Why doesn't this sudo script using zenity work??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux