Make Dolphin show some clue that it's opened as adminstrator

Installing kio-admin and using the menu option to run Dolphin as administrator it fully takes the default theme and shows no visual clue about the super user privileges it has.

How could I make it show some clue about it being root?

Plasma 5.27.8 here.

There is no implementation of such a feature - but it does sound like a good feature to have. It will be great if you can open a feature request ticket at bugs.kde.org.

https://bugs.kde.org/show_bug.cgi?id=485237

when i browse my backup files in timeshift i get a visual indication that i’m running dolphin as root.

@skyfishgoo Can you share a screenshot? It’s it possible that in that case Dolphin is running as sudo or something like that?

When didn’t kio-admin, Dolphin is running as the current user and uses a helper process with polkit to do IO as root, and the only difference is that the URL starts with “admin:” - and you can’t even see that with the default configuration.

It’s likely that affecting the Dolphin UI is out of scope for the kio-admin plugin.

i tired but for some reason the .png created by spectacle would not upload here (or imgur)

but i recreated it again and it worked, so here is my view using timeshift, notice the warning banner and red close buttons

note: i do have Administrative Actions enabled for the context menu, if that matters.

1 Like

I’m not sure what is going on there - that warning message isn’t about using kio-admin or “Administrator access”: it specifically talks about “running as root” - which is not the same as using “administrator access”.

But if I try to run Dolphin using sudo or directly as root, I get this error:

Running Dolphin with sudo is not supported as it can cause bugs and expose you to security vulnerabilities. Instead, install the kio-admin package from your distro and use it to manage root-owned locations by right-clicking on them and selecting “Open as Administrator”.

And Dolphin will not start. So I can’t reproduce the behavior you see.

I’ve found this bug report in the Timeshift Github which talks a bit about the fact that Timeshift is running as root and the problems with using Dolphin like that. So I believe, @skyfishgoo , that you are running Dolphin as root and not using kio-admin, and that workflow is deprecated.

1 Like

i do have kio-admin installed.

if a drill down to dolphin from the application launcher, i don’t see a “run as admin” option in the context menu.

if i go to /bin/dolphin and right click there i do get the “run as admin” option, but running it that way looks the same as regular

only now i can’t write to grub like can from my regular usage… it still prompts me for root privileges but after it says

The document could not be saved, as it was not possible to write to /etc/default/grub.

The way kio-admin works isn’t by altering the Dolphin launcher. It adds a context menu item for folders not owned by you with the text “Open as administrator”. When you activate that option, it sets the Dolphin location to admin:/ followed by the path you wanted to open, and then it passes all file operations through a pkexeced invisible helper process.

I also couldn’t reproduce the “run as admin” function - if I use Dolphin to go to /usr/bin and right click the dolphin binary, I get the kio-admin’s “Open as administrator” function which just opens the current folder in a new window using the admin:/ URL scheme. It doesn’t actually run Dolphin as root - just create a new window in the same user application.

The “document could not be saved” sounds like a Kate message, and not Dolphin, and its behavior should be unaffected by whatever shenanigans you are doing with Dolphin.

2 Likes

Hi cipricus

I added a new toolbar entry “comment” and changed the text to read “root” or “user” in each dolphin.

Vektor

In kio-admin? Will this solve Bug 485237?

1 Like

True, I was not aware kio-admin is not the same thing. Sorry.