Basic KDE Question

How do I use Dolphin to copy a file from my home folder to /opt folder?

You don’t. You use the command line if you really need to change the system files/folders.

1 Like

Yeah I know I can do that.
I was just wondering if there was a way to do it with Dolphin.

Unless you have a service to “copy with root” or run Dolphin as root or with sudo, then no. Not that you should. There’s a reason it’s set up this way.

[demo@manjaro Downloads]$ sudo dolphin
[sudo] password or demo: 
Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. Instead use Dolphin normally and you will be prompted for elevated privileges when performing file operations that require them.


If I try to copy a file I don’t get a paste option to do the copy with so to get a prompt that requires the elevate privilege.

Exactly!

Because running things with sudo is dangerous. Doubly so a file explorer, like Dolphin.

It’s a safeguard built into Dolphin.

What I am saying the message says this but it doesn’t do this:

Instead use Dolphin normally and you will be prompted for elevated privileges when performing file operations that require them.

I use Root Actions from AUR or KDE Store. It adds menu to do admin actions.

Some of its actions may be broken, disable/remove them, and you’re good to go.

1 Like

Ah, well. Then it’s kind of obvious, isn’t it:

DON’T

And anyway, I think any changes you’d make will be overwritten when upgrading.

Edit:

So don’t try, it’s a bad idea in general. Rather ask for a solution to a problem you might have. Because this is sounding more and more like an XY Problem, to me.

If you’re going to go to the terminal to type sudo dolphin, you may as well just copy the file from the terminal and save time.

2 Likes

User wants to do X.
There is no Y

In this case:
X is “I want to copy a file to a system directory”
Y is “why can’t I perform root operations in Dolphin”

Just sudo cp my_file /opt/destination/my_file

I get what you are saying but I am stuck on this message:

Instead use Dolphin normally and you will be prompted for elevated privileges when performing file operations that require them.

Try Ctrl+C

As far as I recall, KDE got rid of that for security reasons. (Not sure why the disclaimer message remains.) To do what you want now requires an addon service, which @omano posted above.

1 Like

This was what I answered. Not why it doesn’t work, or how to do it.

So yes, I’d say it is. You were just wondering. You got the answer.

And you’ve been repeatedly told why it’s doing that, and why you shouldn’t do it. So no, even if I did know more, I won’t tell, because it’s a very bad idea. If you’ve got to ask, you shouldn’t be doing it.

2 Likes

Thanks for scolding me. That helps me allot.

That’s usually a Y.
We don’t know what is X, only that it seemingly requires Y… unless it actually doesn’t.

If I remembered correctly, TimeShift was able to open the Dolphin with root privileges and browse any snapshot.

I guess it uses:

$ pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dolphin

There is a new plugin for Dolphin: Open Dolphin as root - KDE Store