Hello. I wonder what's the most convenient way of running applications which need root priviliges under sway.
sudo gparted
[sudo] password for asbachb:
No protocol specified
Unable to init server: Could not connect: Connection refused
(gpartedbin:1059): Gtk-WARNING **: 11:35:36.413: cannot open display: :0
gparted
localuser:root being added to access control list
Error executing command as another user: No authentication agent found.
localuser:root being removed from access control list
You could try gksu. Just an idea.
gksu <something> no idea if this tool is still being used.
Are you looking for them to just launch, or are you looking for a password dialog to prompt the opening of gparted?
The general issue is that programs running as root aren't allowed to show a GUI through Wayland. One workaround would be to run GParted in Xephyr, if it doesn't support PAM authentication.
(Closing since this isn't a Sway issue.)
@asbachb: I use GNOME authentication agent to launch root applications.
In my ~/.config/sway/config:
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
@asbachb: I use GNOME authentication agent to launch root applications.
In my~/.config/sway/config:exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
Sorry for the late reply. But that was EXACTLY what I was looking for.
It is possible to run wayland apps as root under sway like so:
sudo env XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR gedit
Yet another way, if, for some reason, previous advices doesn't work for you:
ssh -X root@localhost
gparted
(obviously, it requires configured sshd with allowed root login and X forwarding)
https://wiki.archlinux.org/index.php/Running_GUI_applications_as_root
xhost si:localuser:root
this works
Most helpful comment
@asbachb: I use GNOME authentication agent to launch root applications.
In my
~/.config/sway/config: