Views:
138β
Votes: 2β
Tag :
nautilus
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/855163
Title:
Trying to Add A Feature to Nautilus
ID:
/2016/11/30/Trying-to-Add-A-Feature-to-Nautilus
Created:
November 30, 2016
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
You donβt need the source code so donβt worry about downloading foo and patching it.
See Nautilus instructions for creating your own script here (Help Ubuntu - Nautilus Scripts How to). Basically you:
- Navigate to the directory
~/.local/share/nautilus/scripts/
- Place your script (written in Bash, Perl or Python) there.
- Mark the script as executable using Nautilus or from terminal with
chmod +x script_name
- Nautilus makes environmental variables available to your script: NAUTILUS_SCRIPT_SELECTED_FILE_PATHS, NAUTILUS_SCRIPT_SELECTED_URIS, NAUTILUS_SCRIPT_CURRENT_URI, and NAUTILUS_SCRIPT_WINDOW_GEOMETRY
There are sample scripts located at (Help Ubuntu - Nautilus Sample Scripts) for e-mailing files, mounting an ISO file, setting files to read only, editing file with gedit ROOT priviledges, opening terminal at current location, etc.
Look through the scripts and take one as a template for encrypting files using right-click.