1

Topic: [SOLVED] How to run GParted on a GNOME Wayland desktop

Background:

Fedora 21 and later releases include the option to also use the new Wayland as well as the existing X11 Window System to display graphics on the screen.  While Wayland provides compatibility for existing X11applications, configuration of this is not yet 100% compatible with using X11 Window System natively.  Specifically GParted needs to run as root, rather than your own user logged in to the desktop, and as found in Fedora 23 this is not yet allowed.

Upstream Fedora bug report:
Bug 1266771 - Under Wayland apps run via su or sudo are not authorised to connect to the X11 display server


Failure example:

At the login screen select "GNOME on Wayland" rather than "GNOME or "GNOME Classic" to use Wayland.
Login screen with "GNOME on Wayland" selected


When GParted is run from the desktop it just never starts.  Run GParted from a terminal to see the failure:

[fedora@localhost ~]$ sudo gpartedbin
[sudo] password for fedora:
No protocol specified

(gpartedbin:19193): Gtk-WARNING **: cannot open display: :0
[fedora@localhost ~]$

Error failing to run GParted in terminal window


Workarounds:

Use one of the following workarounds:

1) Do not use Wayland.  Instead select either "GNOME" or "GNOME Classic" at the login screen.

2) Allow root to display applications on your desktop.  Before running GParted type the following into a terminal window:

xhost +SI:localuser:root

Update history:

  • 2017-Sep-08: Update workaround option 2 instructions to only allow root, rather than all local users, to display application on your desktop.

2

Re: [SOLVED] How to run GParted on a GNOME Wayland desktop

See also GParted 0.30.0 Release which includes an interim fix to enable running GParted as root under Wayland.