Nautilus and editing text files as root.
Paul W. Frields
paul at frields.com
Fri Oct 17 12:21:48 UTC 2003
On Fri, 2003-10-17 at 07:53, Mattias Dahlberg wrote:
> Seeing how nicely consolehelper is used to request the root password when
> a redhat-config-* tool is launched, I was wondering if the same technique
> could be used to bring an Edit as Root option for text files in Nautilus?
I don't know if this completely fills your particular need, but you
could:
1. As root, edit a script in /usr/sbin (let's say "suedit") that calls
your favorite editor with arguments intact. Could be as simple as:
#!/bin/sh
gedit $@
(Obviously, you could make this more complex to handle non-X sessions as
well... you get the point.) :-)
2. Make a link in /usr/bin: suedit -> consolehelper
3. Create appropriate /etc/pam.d/suedit and
/etc/security/console.apps/suedit functions. Look at the existing files
if you need help, or check the docs for pam.
4. Add a Nautilus script to your ~/.gnome2/nautilus-scripts folder to
run suedit.
HTH...
--
Paul W. Frields <paul at frields.com>
More information about the fedora-test-list
mailing list