Root can not open editor.

If I open Konqueror or Dolphin with a Konsole as root I can navigate to a file and open it with Kwrite or Emacs.

However, if I close Konqueror or Dolphin and then open them again as root during the same session, I can not open any editor. Emacs is completely ignored and Kwrite offers the following error, “KDEInit could not launch ‘/usr/bin/kwrite’.” If I want to open a file as root again I have to reboot. How maddening is that!!

Both Kwrite and Emacs are in ‘/user/bin/’.

I have tried “Open with…” and remapping the path to no avail.

Does anyone know what is going on here and how it can be fixed? Why can the files be opened once and not again during the same session?

It’s a know issue
Most of us are using:
kdesu kwrite /path_to_file

It’s not so much a “known issue” as working as it should, your X isn’t allowing non-authorized connections.

You can “go around” it by using xhost +localhost or xhost +local as the normal logged in user, if you have a system with you being the only user.

Thanx for the replies.

Chrysantine, if it is working as it should how is it useful for root to be able to open files only once during a session? What good is that and why was it implemented? It is a drag having to reboot every time I want to go back and reopen an editor.

> It is a drag having to reboot every time I want
> to go back and reopen an editor.

consider this: you can open any file as root in an editor 10,000+
times without doing another boot…just try this:

  1. press and hold Alt, then press F2
  2. in the blank “run command” popup type kdesu kwrite
  3. give root pass when asked
  4. nav to and open/edit/save file
  5. close kwrite
  6. repeat as often as you like

NOTES:

  • by leaving kwrite open and minimized you can avoid steps 1, 2 and 3
    for subsequent edits (it has a small memory footprint…tiny)

  • you can use any editor you wish, that is “kdesu emacs” [or kate,
    etc] works just as well…

  • if you know the path, you can two type:
    kdesu kwrite /etc/fstab

  • don’t wanna have to Alt+F2 and type? then make a program launcher
    with “kdesu [editor of choice]” in the application command line…(in
    fact, you can make one each for kate, kwrite, gedit, emacs…etc etc etc.)


natural_pilot