Bug 1385556 - gparted doesn't start with Gnome and Wayland
Summary: gparted doesn't start with Gnome and Wayland
Status: CLOSED DUPLICATE of bug 1274451
Alias: None
Product: Fedora
Classification: Fedora
Component: gparted
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Mukundan Ragavan
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-10-17 10:12 UTC by Rolle
Modified: 2017-05-21 21:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-11-02 01:11:14 UTC
Type: Bug

Attachments (Terms of Use)

Description Rolle 2016-10-17 10:12:19 UTC
Description of problem:
gparted doesn't start with Gnome and Wayland

Version-Release number of selected component (if applicable):
Fedora 24 Workstation, 64 Bit

How reproducible:

Steps to Reproduce:
1. case a: from GUI: start gparted from gnome gui
1. case b: from terminal: su ...; gparted

Actual results:
from GUI: gparted tries to start, but after a few seconds nothing happens (without any feedback to the user)

from terminal: the following erro message occurred

   No protocol specified

   (gpartedbin:7471): Gtk-WARNING **: cannot open display: :0

Expected results:
gparted to start and presents it's gui

Additional info:

Comment 1 Mukundan Ragavan 2016-10-18 00:59:36 UTC
yeah .. this one wayland/sudo issue tracked under bug#1274451.

Just to be sure though - can you see if you can launch gparted from X11 session instead of wayland?

This is must likely a duplicate of 1274451

Comment 2 Rolle 2016-10-18 07:56:33 UTC
This isn't exact the same issue as bug#1274451.
bug#1274451 describe it as sudo/wayland issue. So apps with this issue doesn't start with sudo command. But they will start as root user (used with su command).

gparted doesn't start neither with sudo nor su command.
gparted  works fine with X-Org server.

I see now 2 possibilities:

1. In Fedora24 is in the wayland session no XWayland-layer(?) or so implemented -> there will be no bug fix needed, because the further development will be realized in Fedora 25.

2. In gparted is an old(?) gtk-function used, that is incapable to redirect to wayland calls and it will fail. But other gtk-apps doesn't have this problem, so I think they use other gtk-functions, that automatically redirect to wayland calls. -> Here is the possibility to change in gparted the gtk-functions. (Maybe I'm to naive and I'm wrong :-)

Comment 3 Mike Fleetwood 2016-10-23 20:31:09 UTC
Despite what Rolle says, this bug is a duplicate of bug 1274451.
My standard text follows ...

This is caused by Wayland not allowing processes run as a different user
to display on the desktop.  Therefore using "su" or "sudo" to display a
graphical application doesn't work.

Simple workaround is to run "xhost +local:" in the terminal first.

This is documented in the GParted forum here:
  [SOLVED] How to run GParted on a GNOME on Wayland desktop

This bug should be closed as a duplicate of bug 1274451.
(But I don't have permission to do that).

Mike Fleetwood (GParted Developer)

Comment 4 Mike Fleetwood 2016-10-23 20:52:09 UTC
To counter Rolle's 2nd possibility.  Try to run up to date
gnome-system-monitor 3.20 on GNOME 3.20 desktop on Fedora 24, after
suing to root.  Result is gnome-system-monitor fails to connect to the
display exactly as GParted does.

[fedora@fedora24 ~]$ rpm -q gnome-system-monitor
[fedora@fedora24 ~]$ env | grep DISPLAY
[fedora@fedora24 ~]$ su -
[root@fedora24 ~]# env | grep DISPLAY
[root@fedora24 ~]# export WAYLAND_DISPLAY=wayland-0
[root@fedora24 ~]# env | grep DISPLAY
[root@fedora24 ~]# gnome-system-monitor 
Unable to init server: Could not connect: Connection refused

(gnome-system-monitor:2769): Gtk-WARNING **: cannot open display: 
[root@fedora24 ~]# export DISPLAY=:0
[root@fedora24 ~]# env | grep DISPLAY
[root@fedora24 ~]# gnome-system-monitor 
No protocol specified
Unable to init server: Could not connect: Connection refused

(gnome-system-monitor:2773): Gtk-WARNING **: cannot open display: :0

Comment 5 Mukundan Ragavan 2016-11-02 01:11:14 UTC
Closing as duplicate as pointed out by Mike.

*** This bug has been marked as a duplicate of bug 1274451 ***

Comment 6 Radist Morse 2017-03-16 18:14:27 UTC
So, the bug 1274451 was closed as WONTFIX, and the resolution is that from now on GUI application shouldn't be run with root privileges, and all the privileged operation should be handled using polkit (I actually have no idea what does it mean, see comment 33 in that bug for details).

And since gparted is a GUI that has no meaning without root access, I'd say this warrants for a bug re-open.

Comment 7 rugk 2017-05-21 16:32:55 UTC
Any news here? I experience the same issue.

Comment 8 Mukundan Ragavan 2017-05-21 20:02:34 UTC
(In reply to rugk from comment #7)
> Any news here? I experience the same issue.

I don't think there is any change. The way to launch graphical applications in wayland as root is described here - http://gparted-forum.surf4.info/viewtopic.php?id=17446

Comment 9 rugk 2017-05-21 21:03:38 UTC
But there should not be software installable, which just does not work in a default installation when starting it.

Note You need to log in before you can comment on or make changes to this bug.