Home > GNOME > Right-Click to Launch Custom Scripts with Nautilus : Ubuntu (6.06.1 / 6.10)

Right-Click to Launch Custom Scripts with Nautilus : Ubuntu (6.06.1 / 6.10)

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:, , , ,

Categories: GNOME Tags:

Related Posts

  1. December 29th, 2006 at 03:44 | #1

    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

  2. Stefan
    December 29th, 2006 at 10:36 | #2

    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.

  3. December 29th, 2006 at 11:42 | #3

    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.

  4. naisioxerloro
    November 28th, 2007 at 19:27 | #4

    Hi.
    Good design, who make it?

  1. January 18th, 2007 at 15:03 | #1
  2. May 13th, 2007 at 09:43 | #2
  3. May 14th, 2007 at 18:07 | #3