Sudo'd apps result in "cannot open display"

First, I did try to search the forums but did not have any success. I found the search not to be super effective but it could be the user. I’ve been a SUSE user for almost a decade and I’m currently having a brain fart and can’t seem to fix a simple issue. I’m trying to run a sudo’d app “ie: sudo dolphin” in a terminal and I keep getting “cannot open display”.

A normal fix would have been to set the display and export it using " DISPLAY=:0.0; export DISPLAY" but that doesn’t seem to work.

Help?!

Running KDE on OpenSUSE Factory (currently updated as of today)

You can open dolphin as super user under menu/system/filesystem superuser.

Right.
And for other applications, use kdesu instead of sudo to run them as root.

Background: Applications run as a different user are not allowed to open windows in the user’s X session by default. And they might need more in the environment than just $DISPLAY, e.g. the address of the current D-BUS session.
That’s nothing new, btw. :wink:

D’oh! Didn’t know that. thanks!

You’re welcome :slight_smile:

I have never found a search function in a forum that seems of any real value.

Instead, I go here:

and enter a search such as

opensuse sudo "cannot open display"

:wink: