In the latest version of the PCManFM the option under Tools-Open Current Folder as Root has been removed. Is there a way to re-add the option? I know I can open PCManFM as Root via the Terminal but it was handy to open the specific Folder under the Tools option. Also is there a way to add the option as a Context Menu entry?
I didn't understand the Desktop file specification extension (DES-EMA).
I found this:
[Desktop Entry]
Name = Open as Root
Tooltip = Open the folder as root
Icon = terminal
Profiles = on_folder;
[X-Action-Profile on_folder]
Name = Open as Root
MimeTypes = inode/directory;
SelectionCount = 1
Exec = gksudo pcmanfm %s
I then name the file pcman_root.desktop and place the file into: ~/.local/share/file-manager/actions
. Unfurtunately, I do not have the folder file-manager/actions
under the ~/.local/share
directory. Am I supposed to create that specific folder?
Best Answer
You are on the right track.
Create
~/.local/share/file-manager/actions
.In that folder, create
root.desktop
(not pcman_root.desktop or anything else).Add this content:
Save the file.
(Or download the script from here.)
Restart PCManFM (System Tools, Task Manager, terminate or kill pcmanfm, then start it again). Now, when you right-click on a folder, you should see the "Open as root" option in the context menu.
As others have stated, this feature can be dangerous which is why it is not there by default.
And this is what a developer associated with the PCManFM project has to say in response to a "request" for the feature to be restored: