I'm using Gnome instead of Unity, but they should be the same (more or less).
Nautilus (a.k.a. Files) keeps its keyboard shortcuts in ~/.config/nautilus/accels
File Rename is listed there as:
; (gtk_accel_path "<Actions>/DirViewActions/Rename" "F2")
The ;
means that it is commented out and Nautilus uses the system default.
If you remove the ;
and change the line to:
(gtk_accel_path "<Actions>/DirViewActions/Rename" "<Primary>Return")
Then File Rename will be changed to Control-Enter
.
It seems that there is only one shortcut possible for each operation. Nautilus uses the last one listed.
So you can't have F2
and Control-Enter
at the same time.
In order for the changes to take effect you have to stop nautilus. Run the following from the commandline (before you make the change):
nautilus -q
Detailed steps (on request):
open Files ('Nautilus')
browse to directory .config/nautilus
in your home directory
if you don't see directories starting with a dot, press <Ctrl>H
or in the preferences for Files ('Nautilus'), tick the box for displaying hidden files.
right-click or double-click file accels
so that it opens in an editor (likely gedit
)
Alternatively, hit <Alt>F2
and give command: gedit ~/.config/nautilus/accels
Now we have the configuration file in an editor, we have to stop Files ('Nautilus') before we can make changes. Again, two ways of doing this:
- Option 1: open a terminal window (
Gnome Terminal
) and kill nautilus, by issuing command: nautilus -q
. Your Files window(s) should all disappear
- Option 2: hit
<Alt>F2
and give command nautilus -q
. Your Files window(s) should all disappear
Now Files ('Nautilus') has been stopped, we can make changes to its configuration files.
- In the editor, make the changes as listed above and save the file
- Exit the editor
If you now open Files ('Nautilus') again, your changes should take effect
Answers to foot notes:
- It is relevant to specify the application you're having a problem with. In this case, it was the configuration of the application as opposed to a system setting that had to be modified to resolve this issue.
- People will know what you mean by
GUI Environment
. It is however generally referred to as GUI
or Desktop
in this context.
<primary>
mean? Nothing comes up if I search for that on Wikipedia. – SarahofGaia Nov 12 '15 at 17:28F2
andCtrl+Enter
. Still, it's just as nice to even just haveCtrl+Enter
! :D – SarahofGaia Nov 12 '15 at 17:28;
tells Nautilus to ignore everything that follows it. Nautilus will then use its default setting, which isF2
– NZD Nov 12 '15 at 19:56<Primary>
is the GTK name for the Control key. See http://unix.stackexchange.com/a/168516/121614 – NZD Nov 12 '15 at 20:07#
syntax for commenting in an HTML document, right? – SarahofGaia Nov 18 '15 at 17:50Ctrl
is not a Windows-proprietary, nor has ever been a Windows-proprietary key label, correct? – SarahofGaia Nov 18 '15 at 17:54Ctrl+Enter
. ;) – SarahofGaia Nov 18 '15 at 17:59<!--
and-->
, Bash and most configuration files use#
to introduce a comment. And, yes;
has the same function as these comment delimiters in HTML (2)Primary
is a GTK+ thing, for details see this post on UL – NZD Nov 18 '15 at 18:40GUI Environment
." I realise now that technically it wasn't redundant since there are also TUI environments, not just GUI. (2) "It is however generally referred to asGUI
orDesktop
in this context." Isn't "desktop" most often used to refer to the desktop? – SarahofGaia Nov 24 '15 at 19:59