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

Thread: Cannot run kate, gedit as root (using su/kdesu)

  1. #1
    Join Date
    Apr 2009
    Location
    Ostrava, Czech Republic
    Posts
    25

    Default Cannot run kate, gedit as root (using su/kdesu)

    Hello,
    I have fresh installation of openSuSE 11.1 with KDE4. I only installed nVidia driver what also updated kernel to 2.6.27. I wanted to make changes in some config files so fastes way for me was to open KDE console and do:
    Code:
    su
    Password: ****
    kate
    But nothing happened. Console was blocked but no window of kate. When I pressed CTRL+C then I could continue in console. The same problem is with gedit.
    But when I run kate/gedit from console as me (normal user) it works well. I also tried
    Code:
    su root kate
    Password: ****
    and I got error message Cannot execute /usr/bin/kate. I thank the problem can be with running KDE application from console, so I ran Konqueror as root from SuSE menu, right clicked on file I wanted to open and selected open with kate. But nothing happened. Then I tryied to use gedit, and I got same merror message like in concole(Cannot execute /usr/bin/kate).
    Do you think the problem is because I do not have latest kate/gedit or latest KDE4?
    Laptop: openSuSE 11.0 on Asus F5V; Intel T2250 1730MHz; 2GB; 160GB; ATI Radeon X2300
    Desktop: openSuSE 11.1 on AMD Duron 1600MHz; 1GB; 160GB; nVidia FX5500
    Multimedia PC: openSuSE 11.1 on Intel Atom 330; 2GB; 840GB; Intel Acc 950; Leadtek DTV 2000H

  2. #2
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    If you run su from a terminal and then try to execute commands, you won't be able as xhost permissions won't allow the new connection.

    alt+f2 -> kdesu kate or kdesu gedit

  3. #3

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Chrysantine,

    On my 11.0 box, switching to root in konsole by using either "su" or "su -" and then entering "kate /etc/fstab" works. Kate opens and gives me root priveleges to edit and save fstab. I just tried these two methods. Konsole tells me kbuildsycoca is running and the konsole window is blocked from further normal keyboard input until I exit from kate.

    Of course, the "kdesu" method works to run kate as root and the "sudo" method fails from konsole. That's what I would expect.

    Did I not understand your reply?

  4. #4
    Join Date
    Apr 2009
    Location
    Ostrava, Czech Republic
    Posts
    25

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Hi,
    It can be the reason. I will try to test it tomorrow.
    However, it doesnot explaing why I am not able to open file in kate from Konqueror what I ran under root.
    Laptop: openSuSE 11.0 on Asus F5V; Intel T2250 1730MHz; 2GB; 160GB; ATI Radeon X2300
    Desktop: openSuSE 11.1 on AMD Duron 1600MHz; 1GB; 160GB; nVidia FX5500
    Multimedia PC: openSuSE 11.1 on Intel Atom 330; 2GB; 840GB; Intel Acc 950; Leadtek DTV 2000H

  5. #5
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Quote Originally Posted by thisoldman View Post
    On my 11.0 box, switching to root in konsole by using either "su" or "su -" and then entering "kate /etc/fstab" works.
    It changed in 11.1 and thus no longer works.

    You can go around this by using xhost +localhost.

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

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    kdesu kate or kdesu gedit is the way to go

    eg;
    Code:
    kdesu kwrite /etc/fstab
    In a terminal
    enter password when requestd
    @Chrysantine was spot on
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  7. #7
    Chizelle NNTP User

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Is there a solution to this in gnome? I'm having the same sort of problem, wanting to edit and save config files in gedit. su in the terminal window doesn't allow me to save files in the X11 session, tho I'm sure it would let me edit and save them if I knew how to use gedit from the command line. I'm running 11.0 with gnome.

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

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    gnomesu gedit /etc/fstab

    (/etc/fstab) is just an example location.
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  9. #9
    somebody_else NNTP User

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Chizelle wrote:
    > Is there a solution to this in gnome?


    try:

    gnomesu gedit

    --
    decorated_warrior

  10. #10
    Chizelle NNTP User

    Default Re: Cannot run kate, gedit as root (using su/kdesu)

    Thanks, that's easier than chmod 777, chmod 644 for each file that needs to be changed. ^-^

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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