How to start Krusder as root not using kdesu

Krusader can be started as admin/root by a little red icon.
That uses kdesu. Kdesu is unsafe…
How to use pkexec instead??? (using this icon, maybe env-variable?)

Tipp:
do not write export QT_QPA_PLATFORM=wayland into /etc/environment
==> otherwise if you click the red icon Krusader will not start.
(zsh: ==> pkexec krusader works, even kdesu krusader)

Hi @GaVenga,

This should help:

https://unix.stackexchange.com/questions/203136/how-do-i-run-gui-applications-as-root-by-using-pkexec/203149#203149

Edit:

Also see:

https://unix.stackexchange.com/questions/203136/how-do-i-run-gui-applications-as-root-by-using-pkexec/627007#627007

Edit #2:

Also:

https://unix.stackexchange.com/questions/203136/how-do-i-run-gui-applications-as-root-by-using-pkexec/677103#677103

Specifically:

Also note that you very rarely need to run an editor as root. If you need to change a file owned by a different user, you can do it on any reasonably modern system using GVfs:

gedit admin:///etc/fstab

This runs the polkit authentication agent (asking for a password) just like pkexec does, but instead of running the editor as root, it gives it unrestricted access to a single file.

1 Like