1. 10 Best Pcmanfm Actions

Pcmanfm & Openbox Guide
          Open as Root
          Edit as Text
          Backup File Here
          Copy to Folder
          Empty Trash
          Set as Wallpaper
          Create Desktop Shortcut
Madebits Actions
my actions
A Custom Actions Menu

Pcmanfm can be configured to allow just about anything to be listed in the pop-up box that appears when right clicking a file or folder, the so-called file browser right-click or actions menu. Madebits released a nice deb in 2015, which adds the 8 actions shown in the box on the upper-left, to the pcmanfm action menu.

The actions in the madebits program show the route in general for putting actions into pcmanfm. The madebits program puts 8 action desktop files for the 8 Madebits Actions in /usr/local/share/file-manager/actions and the corresponding exec files, where needed, in /opt/madebits-pca_1.0.0. A menu, Custom Actions, for madebits generated actions is included in /usr/local/share/file-manager/actions as mb-menu.desktop. Each new action must have its name added to the list in Custom Actions. A custom actions menu is shown in the photo on the right.

So the general rule for adding an action to pcmanfm:

[Desktop Entry]

[X-Action-Profile profile-zero]
Exec=/opt/madebits-pca_1.0.0/checksum.sh %f

[Desktop Entry]
Name=Custom Actions

On the right is mb-menu.desktop showing 18 actions, and above it is a corresponding pcmanfm custom actions menu showing 16 of these actions. On the left is the action desktop file for the checksum action, which can be taken as a prototype for new actions. All the user needs to do for each action desktop is edit mb-checksum.desktop to the correct name, chosen icon and the "Exec" of the action.

The table below lists the basic information for 10 good pcmanfm actions that can be applied to root files as well as user files, 6 edited from the 8 original madebits actions and 4 new ones: checksum, move to folder, permissions and slideshow. The two most important are "open as root" and "edit as text" which apply directly to root files. To generally apply the other actions to a root file, first (when required) open the containing folder using "open as root" and then apply the action to the file inside the root folder.

ActionExec in /usr/local/file-manager/actions/*.desktopScript Source
Backup File Herex-terminal-emulator -e "sudo /opt/madebits-pca_1.0.0/backupfilehere.sh %f"Edited Madebits
checksum/opt/madebits-pca_1.0.0/checksum.sh %fDownload here; See below
Copy To Folderx-terminal-emulator -e "sudo /opt/madebits-pca_1.0.0/copy2folder.sh %f"Edited Madebits
Create Desktop Shortcutx-terminal-emulator -e "sudo /opt/madebits-pca_1.0.0/createshortcut.sh %f"Edited Madebits
Edit As Textx-terminal-emulator -e "sudo geany %F -i"Edited Madebits to Open Root Files
Move to Folderx-terminal-emulator -e "sudo /opt/madebits-pca_1.0.0/move2folder.sh %f"See below
Open As Rootlxterm -e 'sudo pcmanfm -n %u'Edited Madebits to Open Root Folders
permissions (of each item)/opt/madebits-pca_1.0.0/prm %fprm below; requires xdotool
set as wallpaper/usr/bin/pcmanfm -w %fFrom Madebits
slideshowmirage --fullscreen --slideshow %fFor mirage

General software requirements for the above actions are coreutils, libfm-tools (for lxshortcut), xdotool, lxterm and zenity. The action desktop file for Checksum, which shows the MD5, SHA-1, SHA-256 and SHA-512 sums, when applied to a file, can be created by copying and pasting from the box on the upper left. The exec script, checksum.sh, was created by Misko_2083 and can be downloaded from this website:  curl -O http://lxlinux.com/checksum.sh.

xdotool key F4 &
sleep 2
xdotool type "sudo stat -c '%a - %n' *" &
sleep 1
xdotool key "Return" &

folder=$(zenity --file-selection --directory --title="Move To Folder")
if [[ $folder ]]; then
    # mv -n $@ "$folder"
    for var in "$@"
    mv -n "$var" "$folder"