Can't run gparted on Debian11 with KDE and Wayland "Gtk-WARNING **: cannot open display: :1"
When I run /usr/sbin/gparted
it returns:
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Gtk-WARNING **: cannot open display: :1
and fails to launch. I'm using Debian11/KDE with Wayland and Gparted 1.2.0. I tried setting export DISPLAY=desktop:0
.
See this similar issue for bleachbit: https://github.com/bleachbit/bleachbit/issues/1045
And see: https://wiki.archlinux.org/title/Running_GUI_applications_as_root#Wayland
However, GParted should not run the GUI as root (for example see the top of the link above). For security reasons, it should only prompt for root permissions when performing some scan or action that requires these permissions (for that command / script, not the entire GUI).