Wayland-Compatible Approach for GParted

I noticed that under Wayland, running GParted with root privileges can be problematic because GUI applications cannot access the display as root. I would like to propose a potential workaround that may help make GParted functional under Wayland:

The core functionality of GParted already relies on command-line tools that require root privileges. My suggestion is to separate the privileged backend from the graphical user interface in the following way:

  1. The user launches the core backend component with root privileges.

  2. This core backend then starts the GParted graphical interface as an unprivileged user.

  3. The role of the GUI is only to display information and to generate an execution script when the user clicks the Apply button.

  4. Once the script is generated, the privileged backend executes it with administrative rights.

  5. The backend can then analyze the script’s exit codes to determine whether the operation succeeded or failed.

This architecture would allow GParted to remain Wayland-compatible, since the GUI itself would not need elevated privileges.

You probably want to use the GParted issue tracker.

Thank you, Sir, for the reply. I failed to sign up to gitlab.gnome.org. The GParted forum was closed. The members of the IRC channel gparted are offline.

You should be able to sign on to gitlab.gnome.org; if you can’t, make sure to gather all relevant information—what you did to sign up, your IP, and what happened when you tried—and join the GNOME Infrastructure room on Matrix.

The problem with opening a topic related to gparted is that, as far as I know, gparted developers are not reading this forum. GParted is hosted on GNOME infrastructure for historical reasons, but it’s not a GNOME project.

I am also fairly sure that GParted developers are aware of how to make their project work without using elevated permissions; they just don’t have the resources to make it happen.

1 Like

Thank you very much, Sir.