Want to add custom actions support for the default Nautilus file manager in Ubuntu 22.04 and/or Ubuntu 23.04? Try this application!
Custom Actions is a feature to add custom menu option into file or folder’s context menu. With it, user can right-click files/folders and select user’s custom option to do whatever actions as prefer.
Nautilus previously has custom action support through ‘nautilus-actions
‘ package, which however abandoned for a few years. For those who miss this feature, there’s a free and open-source tool can do the job.
The tool should also work in Fedora and other Linux with GNOME, though NO pre-build package provided.
Step 1: Install ‘Actions for Nautilus’
The tool provides .deb
package available to download at the link below:
Once you got the package, right-click on blank area in the ‘Downloads’ folder, and select “Open in Terminal“. Finally, run command to install the package:
sudo apt install ./actions-for-nautilus*.deb
NOTE: The package (1.6.1 so far) requires Python 3.10+, meaning Ubuntu 22.04 & higher.
As the project described, it’s also recommended to install 2 other packages via command:
sudo apt install xclip zenity
Step 2: Add Your Custom Actions
After installing the package, click on top-left “Activities” to open overview. Then, search for and launch ‘actions for nautilus’.
It opens a page (WebUI) in default web browser. There include a few pre-installed actions (e.g., ‘Run in python3’, ‘Open in gedit’). You can remove them and add your own one by doing following steps one by one:
- Click ‘+ Action‘ in left, to add a custom action.
- Then select ‘command‘ or ‘menu‘ (for sub-menu).
- Type a name for “Label for the command”. It will be displayed as context menu option.
- Type command for “Command line to execute” for action.
- Enable and set more options if required.
- Finally click ‘save‘ button in top-center to save the custom action.
Step 3: Apply changes
After adding your own custom actions, you need to quite Nautilus to apply changes.
To do so, either log out and back in. Or, open terminal (Ctrl+Alt+T) and run command:
nautilus -q
Finally, verify by right-clicking a file/folder and click the custom menu option. In my case, I added a ‘Shred File’ option.