Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Can't launch editor as root

  1. #1

    Default Can't launch editor as root

    OS 11.1 KDE 4.2. I am trying to edit some configuration files, and I am finding that I cannot pull up a text editor (kwrite or kate) if I in root. The only way I can open one up with root privileges is via

    kdesu kate/kwrite

    I could access kate as root in 10.3, so not sure why this is happening here. Browsed through KDE settings and Yast, but couldn't find any obvious settings.

    Any advice appreciated.

  2. #2
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Can't launch editor as root

    If you browse to the file with "File Manager - Super User Mode," right-click on the filename and select "Open with KWrite," does that work? From your question, I assume that you're in a Konsole (or equivalent) at a command-line interface, logged in as root ("su") and that you manually enter "kwrite [filename]" in the terminal.

    If not, and I've got it backwards (not unusual for me), try it that way and see what happens.

  3. #3

    Default Re: Can't launch editor as root

    Hi, thanks for the suggestion. I was actually in a konsole as root and entering kwrite manually.

    I tried what you suggested (entered dolphin as super-user), but when I tried to open the file I wanted, it gave me:

    KDEInit could not launch '/usr/bin/kwrite'

    So, no joy there either. My workaround at the moment is to open kwrite with kdesu, and then open the files I need through kwrites menus. Clunky, but it's all I have at the moment.

    Will welcome any further suggestions.

    Thanks!

  4. #4
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Can't launch editor as root

    Two other suggestions, actually.

    1. In your Konsole, before you su to root, enter "which kwrite" to get the path. Then su to root and enter that full path. See if you get an error message. If it starts up and runs, there you go.

    1-1/2. You can also try an "echo $PATH" to see if /usr/bin (if that's where kwrite is at) is in your path, but I can't imagine that it wouldn't be. I can't see how your system would even be usable if it wasn't.

    2. Try restarting. When I was using KDE 4.1, I'd get weird problems like this from time to time. A restart might help. Not to depress you, but this is one reason why I backed off of KDE 4. I was tired of **** like this. (And losing my taskbar or KMenu for no apparent reason. And then losing my sound and never getting it back. And ... you get the idea.)

    Finally (OK, this is a third suggestion), it'd be a lot of work and a pain, but you could revert back to KDE 3.59 until they get all the bugs worked out of KDE 4. I personally don't think it's ready for prime time yet.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,179
    Blog Entries
    1

    Default Re: Can't launch editor as root

    ...or you could install and use a relatively user-firendly CLI text editor like nano or pico instead.

  6. #6
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Can't launch editor as root

    Quote Originally Posted by deano_ferrari View Post
    ...or you could install and use a relatively user-firendly CLI text editor like nano or pico instead.
    That's an idea. I use nano when I have to go into a machine remotely with ssh. But to be honest, it's still clunky compared to KWrite, which has things like multiple find and replace, and easy cut and paste.

  7. #7

    Default Re: Can't launch editor as root

    Thanks for the suggestions.

    Kwrite is in /usr/bin, which is in the path.

    I still get the problem, after restarting as before. No error message, but terminal just hangs after entering kwrite as root (with or without full path).

    I must say, besides this and maybe a few other small problems (my sound card shuts off at times until an app needs to make a sound, then it pops back on and makes the sound, then goes dead again, but I digress), I have found KDE 4 (I am at 4.2 now) pretty good. It works better with my laptop, although, to be fair, that might simply be improvements between 10.3 and 11.1, rather than the newer KDE. Anyway, I am afraid I am stuck with 4.2 for now, because I am spending too much time organizing the system (not bugs, necessarily, but installing apps and suchlike), rather than actually doing work!

    Pardon the meandering above, but any further ideas most welcome, and thanks very much for help thus far.

    p.s. I installed nano which seems a good way for quick access to edit files from root...

  8. #8
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,725
    Blog Entries
    20

    Default Re: Can't launch editor as root

    in a terminal

    su -
    password

    konqueror

    (will open k as root - replace application name as required eg: dolphin)
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  9. #9

    Default Re: Can't launch editor as root

    Hi,
    Thanks for the suggestion. Terminal also hangs when I try launching either konqueror or dolphin from root. I suppose this will apply to all applications. I wonder if there is some sort of conflict with happening because KDE wants to launch gui password prompt because it is going into super user mode.

    Just to add some more information about the problem, sudo doesn't appear to work either:

    Code:
    user@linux-48ic:~> sudo kwrite
    root's password:
    kwrite: cannot connect to X server
    user@linux-48ic:~> sudo dolphin
    <unknown program name>(6927)/: KUniqueApplication: Cannot find the D-Bus session server
    
    <unknown program name>(6926)/: KUniqueApplication: Pipe closed unexpectedly.
    Perhaps these problems are linked?

  10. #10
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,725
    Blog Entries
    20

    Default Re: Can't launch editor as root

    but did you try

    su -
    password


    not the same as sudo
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •