Re: Launching Nautilus as su?
- From: William Case <billlinux rogers com>
- To: Simos Xenitellis <simos lists googlemail com>
- Cc: Giorgos <giorgos67 gmail com>, gnome-list gnome org
- Subject: Re: Launching Nautilus as su?
- Date: Sat, 21 Jul 2007 18:23:00 -0400
On Sat, 2007-07-21 at 22:33 +0100, Simos Xenitellis wrote:
> Στις 21-07-2007, ημέρα Σαβ, και ώρα 13:32 -0400, ο/η William Case
> έγραψε:
> > Hi Giorgos;
> >
> > On Sat, 2007-07-21 at 18:17 +0300, Giorgos wrote:
> > > Hi! :-)
> > >
> > > THANKS to Adam and Tim for their help! ;-)
> > >
> > > I didn't made it! I tried the suggested options among some similar ones (eg.
> > > gk, gnomesu etc.).
> > >
> > > All of them are failing after su pwd confirmation. I think maybe is a
> > > general mistake of opensuse (which I'm using) or a specific one for my
> > > hardware configuration.
> > >
> > > I'm thinking to try a different distribution, just to be sure.
> >
> > I have a script that works for me. I am using Fedora 7 and it worked on
> > FC6. I can't see how opensuse would make a difference. All the
> > commands are at the bash and Gnome level.
> >
> > #! /bin/bash
> > # Open nautilus as root
> > # file name: RootBrowse
> > # -K starts new timestamp for sudo
> >
> > 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
> >
> > if [ "$?" != 0 ]; then
> > zenity --error --text="Sorry, wrong password"
> > exit 1
> > fi
> >
> > # End
> >
> > N.B. Be sure to change sudoers default, as root, so that "Defaults
> > requiretty" is commented out otherwise script fails trying to give you a
> > new tty. See example below.
> >
> > # Defaults specification
> > #
> > # Disable "ssh hostname sudo <cmd>", because it will show the password
> > in clear.
> > # You have to run "ssh -t hostname sudo <cmd>".
> > # "Ignore above comments for local machine."
> >
> > # Defaults requiretty
> >
>
> Doesn't OpenSUSE have "gksudo" ("gksu")?
> It come by default with Ubuntu.
>
> If this is a useful feature to have by default in GNOME, then it would
> be good to explore adaptations to gksudo. For example, to differentiate
> between normal nautilus windows and "gksudo" windows, it would be nice
> to have the window theme change, become a big goldish like the location
> bar in Firefox for https websites.
>
> You can visit http://bugzilla.gnome.org/ and request such features!
You are probably right.
However, Fedora does not have gksudo and gksu. In fact, I and others
have put in a request for it. In the meantime, my above script works.
My suggestion to Giorgos is to get it working, on his machine (fewer new
variables); then change the format to whatever works for him or whatever
he has available. Of course, if he doesn't have zenity then he will
have to setup the script with gksudo (gksu). Getting the sudo (su -)
commands to work properly is the primary challenge.
I started by calling the browser for root on the command line; added
zenity (gksudo, gksu) and called them as a script; did some tweaking;
then loaded the script name into a launcher command line. Now I am one
click and a password away from browsing as root.
In fact, I have a very similar script to call emacs (but any text editor
will do) as root starting at the '/' directory. Security is looser but
I no longer have permission annoyances (on a single user machine) for
just about anything I want to do.
--
Regards Bill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]