OGIOS

personal website.


Table of contents

Running x11 GUI app which require root privileges under wayland

Note

Normally running GUI app with root is not a good choice, avoid it as possible.
But there is some app needs root to do stuffs which is we are going to talk about.

Conclusion: run with sudo -E

Useless words

Simply run it may not work since it calls xhost which is normal for x11 clients, they need to connect to x11 server to work.

but wayland does not comes with xhost, so it will raise error:

◉ grub-customizer
sh: line 1: xhost: command not found
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/sbin/grub-customizer no-fork' as the super user
Authenticating as: ogios
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

This incident has been reported.
sh: line 1: xhost: command not found

Simply run with sudo does not work either:

1s ◉ sudo grub-customizer
[sudo] password for ogios:
Authorization required, but no authorization protocol specified
(grub-customizer:4260): Gtk-WARNING **: 10:28:12.657: cannot open display: :0

wiki