Under the new Wayland display server, several applications requiring root permission fail to run. I actually have an answer (one way of working around the issue). I welcome any better solutions or criticisms.

Many other answers to this issue recommend adding root to xhost which, while it solves the issue, breaks the Wayland security model a bit. It is much better that we add root to xhost only for the duration of the running of the program, be it synaptic or gparted or whichever.


Edit your gufw.desktop file (/usr/share/applications/gufw.desktop in Debian 10) and change the line:



Exec=sh -c "xhost +si:localuser:root && gufw && xhost -si:localuser:root"


Inspired by the post at: https://discourse.ubuntu.com/t/adding-applications-to-start-up/9288 Edit /usr/bin/synaptic-pkexec to comment out the zenity warning message (assuming Debian 10) and change the line:

exec "/usr/sbin/synaptic" "$@"


xhost +si:localuser:root
pkexec "/usr/sbin/synaptic" "$@"
xhost -si:localuser:root

I imagine other programs can mostly be adapted in the same way as gufw. This does not solve the underlying issue of old programs running everything including GUI as root but at least they can function like before.

  • The xhost mechanism does not work on remote desktop connections, e.g. when X2go is used to get desktop of Linux machine. I will get following error: ` kalle@kalle-linux:~$ xhost +si:localuser:root localuser:root being added to access control list xhost: must be on local machine to add or remove hosts. ` Do you have any ideas, how to get this working with remote desktop environments?
    – Kalle
    Jan 19, 2021 at 14:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.