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.

How can I create a keyboard shortcut so that when I press F12 in nautilus (or desktop), I get a terminal in the current directory?

share|improve this question
    
An added tip, don't use sudo on dconf-editor, run it without. Found that out the hard way, spent a few minutes rebooting and restarting before I figured it out. –  Velocity Drift Mar 18 at 9:38
add comment

3 Answers

up vote 20 down vote accepted

Finally figured it out.. first sudo apt-get install dconf-tools nautilus-open-terminal, then run dconf-editor and set the org/gnome/desktop/interface/can-change-accels boolean on. Then open nautilus using this command (to disable Unity global menu Temporarily):

nautilus -q
UBUNTU_MENUPROXY=0 nautilus

Now you can mouseover the action in the file menu, and change the accel by typing your key while the action is highlighted, finally restart your nautilus. If you don't see Open in terminal in the File menu and you've just installed nautilus-open-terminal, you might need to first run nautilus -q.

enter image description here

enter image description here

share|improve this answer
1  
this helped a lot, thanks –  Ege Özcan Feb 9 '12 at 15:18
    
The trick with F12 key doesn't work for me :( –  Radu Rădeanu May 30 '13 at 9:52
1  
As indicated in the answer, use dconf-editor. Using gconf-editor may not help. –  Kadir Sep 1 '13 at 5:06
add comment

For 14.04

There's also this Nautilus script you could use instead of the dedicated extension:

#!/usr/bin/perl -w
#
# Open terminal here
#
# Nautilus script that opens a gnome-terminal at the current location, if it's
# a valid one. This could be done in shell script, but I love Perl!.
#
# 20020930 -- Javier Donaire <jyuyu@fraguel.org>
# http://www.fraguel.org/~jyuyu/
# Licensed under the GPL v2+
#
# Modified by: Dexter Ang [thepoch@mydestiny.net]
# 2003-12-08: Modified for Gnome 2.4
#       - Added checking if executed on Desktop "x-nautilus-desktop:///"
#         so that it opens in /home/{user}/Desktop

use strict;

$_ = $ENV{'NAUTILUS_SCRIPT_CURRENT_URI'};
if ($_ and m#^file:///#) {
  s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
  s#^file://##;
  exec "gnome-terminal --working-directory='$_'";
}

# Added 2003-12-08 Dexter Ang
if ($_ == "x-nautilus-desktop:///") {
  $_ = $ENV{'HOME'};
  $_ = $_.'/Desktop';
  exec "gnome-terminal --working-directory='$_'";
}

Installation instructions

share|improve this answer
add comment

After installing nautilus-open-terminal, ensure that you have killed all nautilus processes (there's always one non visible nautilus process running, so use pgrep nautilus to find them and use then use the kill command).

Then if you launch nautilus, you should see the Open in Terminal if you right-click in the list of files, like I did in the screenshot below (where I was running 14.04):

enter image description here

share|improve this answer
1  
The problem is I use list view where there is no white space left if the folder contains many files. Now I use tree in list view in the display setting as a temporary solution. –  xgdgsc Apr 10 at 11:19
add comment

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.