How to extend PCManFM with custom actions

How to extend PCManFM with custom actions

PCManFM is a file manager for Linux systems released under the GNU General Public License that is designed to be extremely fast and lean and lightweight. It supports all the basic features necessary for efficient file management as well as a host of other cool features such as custom actions.

What are custom actions in PCManFM?

Custom Actions are a feature of PCManFM that allow the user to create shortcuts to specific commands and tasks. These custom actions appear in the right-click menu when you select a file or folder. This can be used to quickly access any command or program with a single mouse click.

How to use custom actions

It’s easy to use custom actions in PCManFM. All you need to do is follow these simple steps:

  • Create a command: First, you need to create the command you want to appear in the right-click menu. This can be either a terminal command or a specific application.
  • Create a launcher: Once the command is created, you will need to create a launcher file (ending with “.desktop”). This file contains the details of the command and its icon.
  • Set file type: The launcher file needs to be set to executable, so in the properties tab of the launcher, set the file permissions to “executable” for the current user.
  • Copy/move the launcher: The launcher needs to be copied/moved to the “.local/share/file-manager/actions” directory.
  • Enable custom actions: Go to the PCManFM settings and check the “Enable Custom Actions” option to enable the custom actions.

Conclusion

Custom Actions are a great way to access a wide range of commands and applications quickly in PCManFM. It’s easy to set up custom actions, and it can help make managing files a lot simpler and faster.