I use 20.04. How can I open a folder as administrator ? I would like to do it through a file manager, if possible. Thanks.
Announcement
Collapse
No announcement yet.
Dolphin has no Open as administrator
Collapse
This topic is closed.
X
X
-
I have an icon link to application on my desktop which uses this command:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin /
This is a 'work around' because the devs have chosen to remove the ability to start dolphin as root user.
Hopefully, sometime in the future, in my lifetime maybe, the devs will restore the ability to start dolphin as root user. But that has not happened yet, to my knowledge.Kubuntu 24.11 64bit under Kernel 6.12.3, Hp Pavilion, 6MB ram. Stay away from all things Google...
- Top
- Bottom
-
Thanks @TWPonKubuntu
I am new to Kubuntu. I do not know how to make an icon link.
Hopefully, sometime in the future, in my lifetime maybe, the devs will restore the ability to start dolphin as root user. But that has not happened yet, to my knowledge.
- Top
- Bottom
Comment
-
I don't know of a plugin which will solve this problem.
On your desktop, Right click->Create New->Link to Application
Enter an application name. I use "Dolphin as root", on the General tab.
Enter the pkexec command from my first reply, on the Application tab, in the command field.
If you're not familiar with this process, then this is the chance to learn by experimentation.
You can edit the configuration of your desktop icons by Right Clicking on them and selecting Properties.
Sorry that this is abbreviated. You can find better instructions via a NON-google websearch for "create a desktop icon". Don't trust Google...Kubuntu 24.11 64bit under Kernel 6.12.3, Hp Pavilion, 6MB ram. Stay away from all things Google...
- Top
- Bottom
Comment
-
-
You could also put the command in a "ServiceMenu" in which case it will be shown in the context menu (when right-clicking on a folder)
File to create: $HOME/.local/share/kservices5/ServiceMenus/open_dolphin_as_root.desktop
Contents:
Code:[Desktop Entry] Type=Service X-KDE-ServiceTypes=KonqPopupMenu/Plugin X-KDE-Priority=TopLevel MimeType=inode/directory; Actions=OpenDolphinRoot; [Desktop Action OpenDolphinRoot] Name=Open as root Icon=system-file-manager Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin %u
Last edited by kubicle; May 07, 2020, 06:08 AM.
- Top
- Bottom
Comment
-
Just a word of caution: The reason root access from the file manager is not available by default is because it's a bad idea, especially for a user new to Linux.
Files and folders that require root access are set that way so users don't damage their installs by doing something they shouldn't or don't have the experience to do properly. I say this because, in my experience, if you continue to access your system this way you will eventually leave it unusable or unbootable. This forum and many others are full of users desperate to repair damage they created themselves. If you need to edit a file at the root level, you can simply open the file with Kate and save it with your root password, but even then you should know what you are doing, why you are doing it, and how to recover from it.
Not that it really matters, but there are many forums out there where this question would have been left unanswered or the replies would have been unpleasant. because the prevailing notion is if you have to ask how to do something like this you probably shouldn't be doing it.
Do yourself a big favor and keep a good backup of your home folder and a bootable USB drive so you will have half a chance to recover or reinstall.
- Top
- Bottom
Comment
-
Note that "create new" only appears on the right-click menu if your desktop layout is "Folder view".
If it is "Desktop", IMO the easiest way is to right-click the K menu, and choose "Edit applications". Then add a "new submenu" give it a name you like, then click on it on the left scroll box, click new, give it a name, then set it up as above. Click save, exit, then find the item in the K menu, and maybe test it. Then drag it from the K menu to the desktop, or a panel. I like this because if I accidentally lose the icon, I can reestablish it very quickly. The menu can be marked as hidden if you don't like it appearing.
You can achieve something similar by creating a .desktop file, then dragging it to the desktop from dolphin. But IME there's pitfalls that way.Regards, John Little
- Top
- Bottom
Comment
-
Originally posted by Grahm View PostThanks. K Menu is called in by alt + space, right ?
No don't open the menu. Move the cursor over the and press right-click. At least, that's what it looks like for me, maybe yours is different. It's usually at the bottom left.Regards, John Little
- Top
- Bottom
Comment
-
Originally posted by Grahm View PostThank you all. Appreciate the instructions.
@oshunluvr appreciate your word of caution. I was on default Ubuntu before. New to Plasma. But yes, still a lot to learn and can make mistakes. You are awesome
- Top
- Bottom
Comment
Comment