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.

In Ubuntu I can create handy nautilus scripts by putting .sh files into ~/.gnome2/nautilus-scripts directory, and they will appear in the right click context menu in nautilus. In 11.04, I used to be able to assign keyboard shortcuts for my scripts by editing in the file ~/.gnome2/accels/nautilus, but now in 11.10 this file is no longer there to edit. So how can I create keyboard shortcuts for my nautilus-scripts?

share|improve this question

2 Answers 2

up vote 4 down vote accepted
  1. Open gconf-editor and set /desktop/gnome/interface/can_change_accels to true. This lets you edit menu shortcuts.
  2. With Nautilus open, go to File menu, then Scripts, then hover over the Script you want to make a shortcut for.
  3. Press the key combination you want to assign to this Script. You should see it appear on the menu.
  4. Navigate off the menu and test it out.

You need to do this from the File menu of Nautilus...simply right-clicking in a Window to obtain the Scripts list does not allow adding shortcuts.

If you want to remove the shortcut, repeat steps 1 and 2, then press Backspace when your Script is highlighted on the menu. This should remove the shortcut.

Note: you might have to do a "nautilus -q" from Terminal before the gconf change takes effect.

share|improve this answer
    
this no longer works, at least in 14.04, scripts are not present in the menu. Edit ~/.config/nautilus/accels file to change the shortcuts. –  sup Aug 3 at 15:01

This Nautilus extension allows you to edit keyboard shortcuts (accelerators).

After installing the extensions go to Edit -> Keyboard Shortcuts... in the main menu and navigate to ScriptsGroup in the Keyboard Shortcuts dialog. Click the Key cell corresponding to the script you need and enter a shortcut: enter image description here

Unlike the can_change_accels solution this will also work with Unity's global menus.

share|improve this answer
    
that extension actually tells us to try Krusader, and despite it has loads of options what initially seems confuse, I get used fast to it and I like it a lot :) (has all options, you can easly create custom commands and add shortcuts to them, and has interface to easly work with selected files for ex. etc etc..) –  Aquarius Power May 14 '13 at 3:52

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.