Launching GUI applications in the KAuth Helper environment

The problem is that there is no launch of the gui application in KAuth Helper. For example, if you start a process in Helper:

ActionReply reply;
QProcess proc;
proc.start("kate", QStringList()); // *Or any other*
proc.waitForFinished(-1);
return reply;

GUI application will not start. Is this prohibited or is it possible to get around it somehow? Maybe some environment variables are missing?
[image]

KAuth is designed to perform specific tasks as root, ideally as small as possible. Starting a full-blown application and keeping it running is not among its intended use cases.

Not sure what exact things are missing - it could be as simple as all of the KDE/XDG/DBUS/WAYLAND/XAUTHORITY/etc. environment variables that SDDM will set for processes in the session but that won’t exist for a KAuth helper binary started by systemd directly. You could try to figure it out, but it’s not something that anyone in KDE wants you to do, so you’re probably on your own if you go down that route.

If it’s about editing files outside of your home directory, consider using Kate running as your regular user and opening files via kio-admin instead.