Re: Why doesn't this sudo script using zenity work??
- From: Stefano Sabatini <stefano sabatini-lala poste it>
- To: gnome-list <gnome-list gnome org>
- Subject: Re: Why doesn't this sudo script using zenity work??
- 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]