When clicking around in the Gnome-based desktop environment, it can often be useful to quickly start a shell in the current directory. Gnome’s file browser (at least for Debian Lenny) is Nautilus. One adds this capability by adding a custom script that can then be made to appear in the context menu (i.e., right-click menu). Here is an explanation and an example script. Script itself shamelessly stolen:
# From Chris Picton
# Replaces a Script by Martin Enlund
# Modified to work with spaces in path by Christophe Combelles
# This script either opens in the current directory,
# or in the selected directory
base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done
However, this page gave me the additional insight that scripts added to
~/.gnome2/nautilus-scripts will only become available after navigating to the scripts directory within Nautilus. This strikes me as rather odd, and I am quite amazed that I found an explanation for why my new script wasn’t appearing in only a few minutes with google.