Re: edit text files as root



On Sun, 2006-04-09 at 22:58 -0400, kamaraju kusumanchi wrote:
David Clymer wrote:
On Sun, 2006-04-09 at 18:01 -0400, kamaraju kusumanchi wrote:

According to http://kudos.berlios.de/kf/kisimlar/tipsntrix.html#rootedit
, In Ubuntu one can edit the text files as root using the "Edit as Root"
option. But I could not find this option in Debian unstable KDE 3.5.2 .
How can I achieve this behavior in Debian as well?


kdesu kate <name of file> from the command line should work.
But that is from command line. I was looking for something that works
from say konqueror.
However, if
you are looking for a context menu option, you may have to add that
yourself. I'm not a KDE user, so I forget how to do this offhand. If you
right click on the file you are attempting to edit, I'm guessing you'll
see an "open with" option that may allow you to specify a command to use
to open that type of file. If you specify 'kdesu kate %f' it might work..

This is of no use because, let's say I am editing a file called file.txt
which is associated with, say, gvim. I want to use root permissions on
*.txt only when necessary. If I use your method, then kdesu will be
invoked with root permission even when it is not necessary.

For example to edit /etc/file.txt , I probably want to use root
permission. But to edit ~/file.txt I do not need root permissions. I can
edit as a normal user itself.

I think you've got the wrong idea. I'm certain that it is possible in
KDE for a file context menu to contain multiple programs that can
optionally be used to open the file. However, only one is the default.
What I'm suggesting isn't an exclusive association, but an additional
one. Look into how to set up/modify file associations, and I think you
will find you can use that to solve your problem.

-davidc
--
gpg-key: http://www.zettazebra.com/files/key.gpg

Attachment: signature.asc
Description: This is a digitally signed message part



Relevant Pages

  • [Trouble Ticket #190335] AutoReply: freebsd-questions Digest, Vol 246, Issue 26
    ... please edit your Subject line so it is more specific ... you need to open a root xterm or even a root shell, ... boot manager is installed for this mirror and I would like to remove it ... was that NFS mount managwed ...
    (freebsd-questions)
  • RE: Linux auditing checklist, documents
    ... Edit the hosts.deny file and add the following lines: ... Disallow root login from different consoles ... number of commands and delete it on logout of the user. ... By default, when you login to a Linux box, it tells you the Linux ...
    (Security-Basics)
  • RE: Linux auditing checklist, documents
    ... Edit the hosts.deny file and add the following lines: ... Disallow root login from different consoles ... number of commands and delete it on logout of the user. ... By default, when you login to a Linux box, it tells you the Linux ...
    (Security-Basics)
  • Re: Successful install of Fedora7 in VPC2007 guest
    ... Then I used nano to edit grub.conf. ... trying the text editor again (now with root in the command window) but ... the command window is only valid inside the command window itself. ... Is there a way to start the text editor as root???? ...
    (Fedora)
  • Re: Grub
    ... > I have e for edit c for command o/O for open and d for remove. ... If both drives are on the same port, ... So, I'd say your root is probably. ...
    (linux.redhat.install)