I found a nautilus script I would like to use. How do I install it?
Say you want to install the following script you found while browsing Ask Ubuntu:
The first thing you'll notice is that many scripts won't just run out of the box. Sometimes they depend on other packages you might or might not have installed. In this case our script depends on
On other distros this might not be the case and you'll have to install the dependencies before using the script. If the dependency is part of the official repositories you can easily install it with
Setting the script up
Now that we've satisfied all dependencies we can move on and copy the script to our system. To do so we first create a new document in our scripts folder, which is
Next we will create a new empty document by right clicking and selecting Create new Document → Empty Document. Name it anything you want, but beware: The title you choose is how the script entry will later appear in the nautilus context menu. So better choose a descriptive name for the document:
Open the new document up in a text editor of your choice and proceed to copy and paste the contents of the code box above into it. Save it and exit the text editor.
Making it executable
At this point your script is set up correctly but still won't work as the system does not recognize it as an executable file yet. To make it executable, right click on your file and head to Properties → Permissions. Set the checkmark at Allow Executing as program and close the dialogue:
You should now be able to access the script from your nautilus context menu. Just right click on a file of your choice and head to Scripts --> Script name (here: Sample Script). Click on the entry to execute the script on the files you selected:
Automating the installation
You can install a nautilus script to automate the installation of nautilus scripts:
Based on this script and modified to work on recent Ubuntu releases.
P.S.: I used a nautilus script to record the screencasts of this very answer.