Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After searching for a file in Nautilus, how can I open its parent folder?

enter image description here

share|improve this question

5 Answers 5

up vote 1 down vote accepted

The GNOME 3 Nautilus component in its version 3.10 (provided with Ubuntu 14.04 Trusty Tahr) has a new option "Open Item Location" in the item selection context menu of a search. It is basically what you want, and differs from jadonchristensen's Nautilus custom action (reported by scrondo), in 2 ways:

  • The option "Open Item Location" is not displayed outside the context of a search (the custom action is always displayed, but outside a search it will merely refreshes the content of the current folder).
  • In search mode, selecting "Open Item Location" opens the item's parent folder in the same tab, whereas the custom Nautilus action opens it in a new window.

There may be some ways to configure the custom action so that its behavior matches the new "Open Item Location", but I have not found any yet. Generally speaking, being able to define the context of a custom action with a configuration tool would enable the user to only see relevant actions in the context menu.

share|improve this answer

Jadonchristensen found a way to add "Open parent folder" to Nautilus' context menu:

1) install Nautilus Actions from terminal:

    sudo apt-get install nautilus-actions    

2) run Nautilus Actions from terminal:

    nautilus-actions-config-tool

3) click on 'Add New Action' and fill the form as in the following:

    label = Open Parent Folder
    path = nautilus
    parameters = %d

5) save and exit

6) then simply right-clicking on the search result and selecting "Open parent folder" will do the trick.


It would be interesting to know if it's possible to open the containing folder in a NEW TAB rather than a new window.

Is there an option one can add to the nautilus command?


Successfully tested in

  • Ubuntu GnomeShell Remix 12.04 AMD64
  • Ubuntu 13.10 x64
share|improve this answer
    
step 2 - "nautilus-actions-config-tool" returned: "Trace/breakpoint trap", and the configuration didn't open. Any idea what's wrong? –  uval Jul 3 '13 at 9:25
    
Is it possible to show this new action along with other Items(Copy, Paste etc) rather than under "Nautilus-Actions actions"? Thanks. –  TheKojuEffect Feb 13 at 1:38

This has already been requested as a feature: http://brainstorm.ubuntu.com/idea/12628/

A workaround mentioned there is to create a nautilus script:

#!/bin/bash 
# Save this to "~/.gnome2/nautilus-scripts/Browse Container" 
# set Properties Permissions Executable 
# while in Nautilus : right-click-object/Scripts/Browse Container 

nautilus `dirname $NAUTILUS_SCRIPT_SELECTED_URIS`

Alternatively you can use the following syntax to open Nautilus and highlight the file in the containing folder:

#!/bin/bash

nautilus "$1"
share|improve this answer

It's not possible with the default nautilus that is currently shipping with Ubuntu. If you'd like to see this feature, you have two options:

  • Ask nautilus or nautilus-elementary projects to add the feature. (go to their project website to get in touch with them)
  • Ask a nautilus plugin developer (like me) to write a quick python plugin to add the option.
share|improve this answer
4  
Hey, write a quick python plugin to add the option! :) –  fl00r Oct 28 '11 at 14:41
    
That'll be 6 grand please. ;-) –  Martin Owens -doctormo- Oct 30 '11 at 8:20
    
sure man, wait for it –  Sohail Sep 16 '13 at 7:26

If you do not wish (like me) to install nautilus-actions, there's a workaround.

  1. Right click the file and select Properties or press ctrl + i.
  2. Double-click the location and it will be selected. Press ctrl + c to copy the location to the clipboard.
  3. Press ctrl + l to open the location bar.
  4. ctrl + v to paste the file's location followed by enter.

It's not as convenient as the Nautilus actions method, but it avoids installing a package that might in principle, have security issues.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.