You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing open and closed request.
Description
GUI applications(e.g. GParted) which require root privileges don't open their graphical interface due to the fact that root can't access the users environment. In this specific case
XDG_RUNTIME_DIR
WAYLAND_DISPLAY
Sometimes sudo -E should work, but not consistently (depending on the call and app start sequence)
The most Wayland way to achieve this permanently is to add those variables to the sudoers env_keep directive.
That's true, I'd prefer 2 lines of text instead of an additional application plus remembering to add and remove root again from the access control list after app execution.
Your choice. 👍
Already reported ? *
Description
GUI applications(e.g. GParted) which require root privileges don't open their graphical interface due to the fact that root can't access the users environment. In this specific case
XDG_RUNTIME_DIR
WAYLAND_DISPLAY
Sometimes sudo -E should work, but not consistently (depending on the call and app start sequence)
The most Wayland way to achieve this permanently is to add those variables to the sudoers env_keep directive.
This is related to #73
Reference Arch Wiki - Run GUI applications as root
man 5 sudoers
Proposed Solution
echo 'Defaults env_keep += "XDG_RUNTIME_DIR"
Defaults env_keep += "WAYLAND_DISPLAY"' | sudo tee /etc/sudoers.d/wayland
This command creates a wayland file in sudoers.d which adds those variables to the Command Environment(man 5 sudoers)
The text was updated successfully, but these errors were encountered: