This line works on kubuntu and neon, but not Enveavouros KDE:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin
Here is the output from the above message:
“Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)”
I tried the export. Made no difference.
Instead of running dolphin as root, why not install
kde-servicemenus-rootactions which lets you take root actions without actually running your graphical file manager as root.
Don’t know how to implement Looked at https://store.kde.org/p/998469/:
Actually all I need to a way to view root files. Installed nemo. It works easily.
yay -S kde-servicemenus-rootactions
It is in AUR so you can install it as @ricklinux points out above.
It adds a context menu to dolphin that lets you use root without the nasty side effects of running your graphical file manager as root.
I installed kde-servicemenus-rootactions, but I can’t go into a root folder using root actions.
Dolphin is known to cause headache, if you want to run it as root. That, most likely, is the reason why other distributions create a separate launcher. I’m now writing from my second OS because I wanted to check the syntax of that launcher.
You could try starting dolphin using
kdesu dbus-launch dolphin
Maybe that will solve the problem. I didn’t check if that works on EndeavourOS.
Thanks for the info. It doesn’t work on my EndeavourOS KDE. Nemo is actually a smaller install than dolphin, and it works. That’s what I’m using.
I don’t use dolphin either if I need a browser with root privileges. I use either krusader (which is awesome btw) or thunar.
I just checked (out of curiosity) if the workaround I gave you works on my system. That was also a failure.