I’ve tried security.polkit.enable
/env
/XDG_RUNTIME_DIR=
/DISPLAY=
/export
/pkttyagent
/pkexec
/exec
/xhost
/io.elementary.desktop.agent-polkit
/sudo
/dbus-launch
. Haven’t tried gksu
/do
/dbus-session-run
because I don’t know how to get that on NixOS
I’m still failing at launching with various errors
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
Error executing command as another user: Not authorized
This one can be corrected with pkttyagent
(gpartedbin:): Gtk-WARNING **: : cannot open display:
This one can be corrected with sudo
(gpartedbin:): Gtk-WARNING **: : cannot open display: :0
I’ve heard that WayLand don’t permit to open graphical apps as another user than the one launching the WM
This one can be corrected with xhost
, but ideally I would have liked a solution less dangerous security-wise than xhost si:localuser:root && sudo sudo; sudo gparted & sleep 1 && xhost -si:localuser:root
, and it takes root environment who is, if not already configured, quite not adapted to graphical parameters of the current user WM
sudo --preserve-env gparted
seems to resolve all problems, keeping root rights, taking user display parameters aswell as all other environment (WM graphical…)
Error executing command as another user: No authentication agent found.
This one can be corrected with io.elementary.desktop.agent-polkit
/pkexec
If you have different combination of already tried commands; way of using the unusable ones; new ways, don’t hesitate to tell me