How was Dolphin made to open as root?

How was Dolphin made to open as root?

Sorry, to me it is unclear what you mean.

Did you mean you thought you just started Dolphin and that unexpected it started as a root pocess?

Did you mean: I once did that, but now I am forgotten how to do it (in my KDE main menu there is an item System > File Manager Super User mode).

Or do you mean: how did they create such a menu item to start Dolphin in Super User Mode?

For a good problem description it is best to have three items:

  • what exactly you did;
  • what you expected to happen;
  • what happened instead.

Sorry that I didn’t elaborate. I never opened Dolphin as root. I saw that 1st time in OpenSuse. So, I wondered how it is possible. How did they create such a menu item to start Dolphin in Super User Mode?

It probably does something like

kdesu dolphin

which should prompt for the root password.

That was once with Dolphin, not any more, but somehow OpenSuse had done it.

You mean you want to know how that menu item works?

Go to the menu item and do a right click. There is “Edit”. It will show you all ther is.

I think that the OP is asking how it gets invoked under the hood. The command to launch via KDE menu is

dbus-launch dolphin -qwindowtitle "%c" "%u"

but like nrickert is suggesting, there will be code in the actual executable to launch as root.

Yes, but that (and more) can be seen on the place I point to.

Yes, it’s a starting point, but there is nothing in that command that makes it inherently obvious that dolphin should launch as root. That decision is done within the app itself, unlike when just deliberately using ‘kdesu -c dolphin’ for example.

It is still my opinion that one should not do it at all. At least I only tried it now te be of help to the OP. That will probably be the last time for years to come, Simply no need.and too much a temptation to do things as root that need not to be done as root. Again, my personal opinion.

I agree with that that line of thinking myself, but still wanting to provide some clarity to the OP about the underlying mechanism used.

Oh yes, of course. Knowing and understanding more is always better.

Thanks guys!
It is pretty nice being here. :slight_smile:

You are welcome.