1

I want to achieve the following:

  • I have a Nautilus windows showing the /foo/bar dir.
  • I hit Ctrl+n (new window).
  • I want the new window to show /foo/bar instead of my home dir.
Glutanimate
  • 21,393
kispaljr
  • 113

2 Answers2

3

There is no option for changing or customizing the New Window action behavior.

But you can create a nautilus script with the behavior you want and use it instead of the built in action. It's a one-liner that simply opens Nautilus at a given folder. In your case, the current folder. Save the script at ~/.gnome2/nautilus-scripts (~/.local/share/nautilus/scripts for Ubuntu 13.04 onwards).

To invoke such script with CTRL+N you must edit ~/.gnome2/accels/nautilus (~/.local/share/nautilus/accels for 13.04+) and edit the corresponding lines for both your script and New Window builtin action.

You could also request this feature at gnome buglist for Nautilus:

https://bugzilla.gnome.org/browse.cgi?product=nautilus

MestreLion
  • 20,086
2

This Nautilus script should do the trick:

#!/bin/bash
# opens new Nautilus window showing the same folder

nautilus "$NAUTILUS_SCRIPT_CURRENT_URI"

General installation instructions for Nautilus scripts and assigning Nautilus keyboard shortcuts.

Glutanimate
  • 21,393
  • @MestreLion Well, keyboard assignments do work on older releases of Ubuntu but you are right, we didn't really have a canonical answer concerning keyboard shortcuts for Nautilus. I edited my generic installation instructions to add a section on that. – Glutanimate May 30 '14 at 13:02
  • Wow, fantastic! Your updated answer has all the pieces of the puzzle. It should be the accepted answer, at least until someone (either of us?) post the details for his specific scenario – MestreLion Jun 01 '14 at 13:03