Re: [[Bulk] Re: using zenity to write a sudo script ?? [SOVED]

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

 



Hi;

Solved the problem with a forgotten adjustment. I am putting it on the
mailing list in case anyone else has the same problem with zenity.

On Wed, 2007-12-26 at 13:04 -0500, William Case wrote:
> Thanks Stefano;
> On Tue, 2007-12-25 at 11:50 +0100, Stefano Sabatini wrote:
> [snip]
> > > #! /bin/bash
> > > # Open nautilus as root
> > > # file name: RootBrowse
> > > 
> > > sudo -K
> > > zenity --entry \
> > > 	--title="Browse files as root" \
> > >     --text="Enter your user _password:" \
> > >     --entry-text "" \
> > >     --hide-text | sudo -S nautilus --no-desktop --browser 1>/dev/null
> > > 2>/dev/null 
> > >    
> > > # End
> > 
> > This works fine here, both from the commandline and launching it as a
> > nautilus script.

For zenity to work with sudo, the sudoers file defaults have to be
altered.  At least they do on my version in Fedora.

Go to root; visudo; scroll down to Defaults.
Comment out 'Defaults    requiretty' so that it becomes
# Defaults    requiretty
Save and sudo now works with zenity.

I had forgotten this from install to new install.
Why this is necessary is beyond me.  If, anyone has an explanation I
would appreciate reading it.

There should be a clear warning about the possible need to configure the
sudoers file in any or all of the 'man zenity', gnome zenity or the
Zenity Manual Page.

I spent several hours on this and wasted other people's time until I
came across some old notes reminding me.

-- 
Regards Bill

_______________________________________________
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