Dec
29
You might remember my previous post about how to actually use the Create Document option on your desktops right-click menu. Today I’ll go over how to create custom scripts to launch from that same panel. This can go for any frequently used program, custom scripts that you’ve written, etc. This tutorial is rated E for everyone!
First of all let me have you navigate to
~/.gnome2/nautilus-scripts/
Currently this folder is probably empty (if it isn’t you’ve probably already accomplished the purpose of this tutorial). This simple, seemingly insignificant folder can house any program or script you’d like to run. Below are a couple of examples of applications or scripts you could add to your nautilus right-click menu.
gedit Terminal
#!/bin/sh
gnome-terminal
Saving this file with these contents will allow you to launch a terminal in your current directory. (ie; if you launch it from the Desktop it will open a terminal in your home folder. If you launch it from within ~/.gnome2/nautilus-scripts/ it will open a terminal in that same folder.)
You will also need to set any script that you create as executable. You do that, after creating the file, by running the following command:
chmod +x [filename]
Enjoy and, as usual, enjoy your rise to world domination!
Update: There are also a few pre-made script packages that you can install for a few commonly used things. Search via Synaptic or on the command line for:
sudo aptitude search nautilus-script
technorati tags:gnome, nautilus, ubuntu, dapper, edgy
If this site has been useful, please consider participating in the Fundraiser.
Other Points of Interest
Comments
7 Responses to “Right-Click to Launch Custom Scripts with Nautilus : Ubuntu (6.06.1 / 6.10)”
Leave a Comment
You should also try Nautilus Actions[1], that is basically the same stuff but with a better and newer approach.
[1] http://www.grumz.net/index.php?q=taxonomy/term/2/9&PHPSESSID=522bfe0c1c3ae20f36c13bbd8dfac26c
Great tutorial! It seems that Nautilus has to be restarted after adding a script in ~/.gnome2/nautilus-scripts/ in order for it to show up in the right-click menu.
In my experience I never had to restart Nautilus for it to show new scripts. Just make sure the script is flagged as executable and it should show up right away.
[...] just a click to the right January 18, 2007 Posted by remark in Open Source, Ubuntu. trackback Want to be able to launch a terminal window from the current directory in Ubuntu? Idid. Read this. Problem solved. [...]
[...] might remember I blogged about something similar long-long ago with nautilus scripts. This is based on the same idea, but now wrapped in a nice shiny deb package. From the package [...]
[...] might remember I blogged about something similar long-long ago with nautilus scripts. This is based on the same idea, but now wrapped in a nice shiny deb package. From the package [...]
Hi.
Good design, who make it?