Ask Your Question

f24 cannot open display: :0 NOT using wayland!?

asked 2017-09-30 18:02:12 -0500

azzemeen gravatar image

Programs like gedit gparted or even xrandr are failing with the error stated above. Booting into GNOME or KDE won't help. I tried everything that I found on google.

Even xauth + will result in the same error.

export DISPLAY=:0 is set permanently in /etc/environment.

I don't know what I am missing here.

edit retag flag offensive close merge delete


Two questions. First, are you aware that F 24 has long passed End Of Life, and second, are you trying to run these programs as a regular user, or with sudo?

sideburns gravatar imagesideburns ( 2017-10-01 01:45:23 -0500 )edit

I found this issue while preparing my system for an update. The programs wont work when I invoke them as root su -

azzemeen gravatar imageazzemeen ( 2017-10-01 14:57:21 -0500 )edit

The DISPLAY variable is not supposed to be set by /etc/environment That is the job if the display manager such as gdm, xdm, or lightdm. The displaymanager also set the XAUTHORITY variable referring to a dynamic generated file somewhere.

villykruse gravatar imagevillykruse ( 2017-10-02 02:22:14 -0500 )edit

I set the DISPLAY variable as a possible fix. Because both DISPLAY and XAUTHORITY were empty.

azzemeen gravatar imageazzemeen ( 2017-10-02 16:09:18 -0500 )edit

Then I guess you are using wayland after all.

villykruse gravatar imagevillykruse ( 2017-10-03 00:25:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-10-01 18:51:55 -0500

sideburns gravatar image

Root doesn't normally have access to your regular user's display from a terminal, but there are programs you can install that work around this, one of which (my favorite) is beesu. Install it using sudo dnf install -y beesu and then you can run gedit (as an example) with beesu - gedit either from a terminal or a launcher, and beesu will prompt for your password and then run the program for you with root access. (Gnome and KDE both have equivalents, but this one seems to be the most DE-agnostic I'm aware of.)

edit flag offensive delete link more


If even xrandr (with no need for root) is failing, it seems like some XOrg related issue.

ozeszty gravatar imageozeszty ( 2017-10-02 02:25:24 -0500 )edit

Unfortunately beesu runs into the same problem. Also, root used to have access to my regular user's display. It just broke after the last update and I don't know which component causes this problem.

azzemeen gravatar imageazzemeen ( 2017-10-02 03:06:48 -0500 )edit

Have you tried xhost +root which should give the user root access to your display.

jmt gravatar imagejmt ( 2017-10-02 20:04:06 -0500 )edit

I tried that as well but it gives me the same error.

azzemeen gravatar imageazzemeen ( 2017-10-03 03:00:50 -0500 )edit

Question Tools


Asked: 2017-09-30 18:02:12 -0500

Seen: 487 times

Last updated: Oct 01 '17