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

Thread: Unable to run graphical apps as super user

  1. #1

    Default Unable to run graphical apps as super user

    This is occurring immediately after upgrading Leap 42.3 to 15. When I click the icon of a program to run as a super user (such as System>"File Manager - Super User Mode") the kdesu "Run as root" box appears asking for the root password. I enter the password and the box freezes and the graphical app is never loaded.

    If I run the command from the kdesu "Run as root" box manually in a terminal, this is what I get:

    Code:
    sudo /usr/bin/dbus-launch dolphin -qwindowtitle 'File Manager - Super User Mode'
    [sudo] password for root: 
    kwalletd5: Checking for pam module
    kwalletd5: Got pam-login param
    kwalletd5: Waiting for hash on 5-
    kwalletd5: waitingForEnvironment on: 3
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    qt.qpa.screen: QXcbConnection: Could not connect to display 
    Could not connect to any X display.
    Thanks for any help.

  2. #2

    Default Re: Unable to run graphical apps as super user

    You cannot use sudo for running graphical applications in openSUSE.
    Try with "kdesu" or "su -" instead.

    Regarding your original problem:
    Is this specific to dolphin, or does it happen with e.g. YaST too?

    I've never seen the password dialog freeze here. But I do remember cases in the past where the app wasn't started.
    Running "xauth -b" fixed that, so maybe try that.

    Also try whether this happens on a fresh user account.

    PS: this is an X11 session, right?
    I'm not completely sure that running applications as root works in Wayland out-of-the-box yet.
    Last edited by wolfi323; 27-Jun-2018 at 01:00.

  3. #3

    Default Re: Unable to run graphical apps as super user

    It is possibly a hostname issue from the errors. I recommend managing them through YaST.

    Under System you can do Network settings. I don't run Network Manager, but believe you can still set the host name there.

    Under Network Services you can use Hostnames to modify your /etc/hosts file. You minimally want:
    127.0.0.1 localhost

    If you use IPv6 there should be an entry for:
    ::1 localhost ipv6-localhost ipv6-loopback

    Once all that is done make sure your /etc/hostname is correct.

    Last resort, but should not be needed:
    If as an example if your system obtains its IP from DHCP and the system name is foo.example.com you can modify the localhost line to:
    127.0.0.1 localhost foo.example.com foo
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  4. #4

    Default Re: Unable to run graphical apps as super user

    I would be curious if sudo su - works as well. Generally in the past if that fails it also indicates a hostname issue.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  5. #5

    Default Re: Unable to run graphical apps as super user

    Quote Originally Posted by d3vnull View Post
    I would be curious if sudo su - works as well.
    No, and it would actually be pointless.

    "su -" switches to root, why would you want to run it as root (via sudo)?

  6. #6

    Default Re: Unable to run graphical apps as super user

    Quote Originally Posted by d3vnull View Post
    It is possibly a hostname issue from the errors. I recommend managing them through YaST.
    It may be a hostname issue, but the errors don't indicate that.
    The errors are just because sudo doesn't pass the necessary environment, so the app doesn't find the X display (and other things).

    Again, you just *cannot* run graphical applications via sudo in openSUSE. (unless you adjust the sudo configuration)

    If it is a hostname issue, I'd expect applications run as the logged in user not to start as well though.

  7. #7

    Default Re: Unable to run graphical apps as super user

    Quote Originally Posted by wolfi323 View Post
    You cannot use sudo for running graphical applications in openSUSE.
    Try with "kdesu" or "su -" instead.

    Regarding your original problem:
    Is this specific to dolphin, or does it happen with e.g. YaST too?

    I've never seen the password dialog freeze here. But I do remember cases in the past where the app wasn't started.
    Running "xauth -b" fixed that, so maybe try that.

    Also try whether this happens on a fresh user account.

    PS: this is an X11 session, right?
    I'm not completely sure that running applications as root works in Wayland out-of-the-box yet.
    Quote Originally Posted by d3vnull View Post
    I would be curious if sudo su - works as well. Generally in the past if that fails it also indicates a hostname issue.
    Running the command after "su -" loaded Dolphin, but curiously all the graphical icons were missing.

    Prefacing the command with kdesu produced the same password prompt box that freezes once I enter a password.

    I get the same freezing when I attempt to run YaST with kdesu, however YaST runs successfully through "su -"

    The issue was still present after "xauth -b".

    Yes, this is an X11 session.

    Thanks for the suggestions... I will try to reproduce the issue under new user account momentarily.

  8. #8

    Default Re: Unable to run graphical apps as super user

    Quote Originally Posted by vulgate View Post
    Running the command after "su -" loaded Dolphin, but curiously all the graphical icons were missing.
    That's because Qt didn't detect that you are running a KDE session (due to the "su -"), and therefore didn't load the KDE plugin (that would load the KDE settings like icon theme and widget style).

    You could try with su alone (without the "-") and the icons should be there I think.
    Last edited by wolfi323; 27-Jun-2018 at 01:39.

  9. #9

    Default Re: Unable to run graphical apps as super user

    Quote Originally Posted by wolfi323 View Post
    No, and it would actually be pointless.

    "su -" switches to root, why would you want to run it as root (via sudo)?
    I didn't ask the OP to run it as root. I asked him to see if sudo worked. In the past if sudo failed it was because of a hostname issue.


    If you go back and look at his post he never even said he tried to run the application with sudo. He tried to run it with kdesu. The sudo part was part of the error it returned.

    Finally, i actually googled two lines from the returned error. They both pointed back to a hostname issue. Thus my response.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,143

    Default Re: Unable to run graphical apps as super user

    To @vulgate and @d3vnull.

    From your posts I assume that you are missing some background information here. Like Wolfi323 says , it is rather useless to say things like: run as root, but run it as root, ...

    Maybe this might help: https://en.opensuse.org/SDB%3ALogin_as_root
    Henk van Velden

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
  •