67

I want to use the "BackSpace" button as a shortcut key on nautilus. I want to return to the previous folder whilst browsing the Home folder, just like windows 7.

Also I want the same thing while using Firefox, In a way that when I press the shortcut key I will return to the previous web page.

  • 4
    I can't imagine what is motivation to remove very popular hotkey from app for everyday use. – ruX Jan 25 '14 at 9:52
77

For Firefox and Nautilus: You can use Alt+ to go back instead of Backspace.

For nautilus 3.6 to bring backspace functionality you need to add this:

 (gtk_accel_path "<Actions>/ShellActions/Up" "BackSpace")

under

~/.config/nautilus/accels

And then restart nautilus by

nautilus -q or killall nautilus

In Thunar you have to add

(gtk_accel_path "<Actions>/ThunarWindow/open-parent" "BackSpace")

to

~/.config/Thunar/accels.scm
| improve this answer | |
  • 2
    Does it work for you? ; (gtk_accel_path "<Actions>/ShellActions/Up" "BackSpace") For me, its not working. – thefourtheye May 2 '13 at 13:00
  • 7
    Please remove the comment. this one -> ; use only (gtk_accel_path "<Actions>/ShellActions/Up" "BackSpace") – Achu May 2 '13 at 13:15
  • 2
    Aaah... How could I miss that. Spent two hours this morning. I didnt uncomment. :( Thanks @Achu :) – thefourtheye May 2 '13 at 13:17
  • 3
    Thanks. Since it is not possible to "bind" both Backspace and Alt+Up to the same (I'm actually quite used to the Alt+Down/Up instead of Enter/Backspace when using only the keyboard), but as a workaround you can also change Backspace to do "<Actions>/ShellActions/Back". – pileofrocks May 24 '13 at 0:43
  • 2
    Aaaaaaah!! its working! sigh of relief! :D thanx a lot – Nirmik Jun 6 '13 at 9:42
6

For Firefox

Open firefox, type in about:config in address bar, press enter

Search backspace, should return 1 entry, browser.backspace_action

Right click on the value > modify & change from 2 to 0

| improve this answer | |
5

for thunar

Just as I thought, I should have written backspace in a different way. This is how I tried:

(gtk_accel_path "<Actions>/ThunarWindow/open-parent" "BackSpace")

And it worked.

| improve this answer | |
  • Still gice the following error: ("syntax error near unexpected token `gtk_accel_path'" – Tareq May 6 '13 at 6:43
  • @Tareq: Are you using Thunar or Nautilus? Ubuntu comes with Nautilus by default... – Lawand May 13 '13 at 11:06
  • I am using Nautilus. – Tareq May 14 '13 at 15:54
  • @Tareq: well, what I wrote is for Thunar... Did you try Achu's answer?: askubuntu.com/a/289540/815 – Lawand May 14 '13 at 20:15
  • Yes, But it didn't work, I don't know how to make the addition, or how to write on the Read-Only file (accels). – Tareq May 17 '13 at 9:27
4

Is not "up" is "back", back is the last directory.

echo '(gtk_accel_path "<Actions>/ShellActions/Back" "BackSpace")' >> ~/.config/nautilus/accels
| improve this answer | |
  • Indeed this is the only one that worked for me. – Ruben Mar 26 '14 at 23:19
  • Correct - this is proper one for "back', up is parent directory not back. Also note that at least in nautius 3.10 (14.04, trusty) backspace is auto binded to up so one would need to manually edit the file. – doug Jul 3 '15 at 13:40
2

To make Nautilus go back like in old times, with the Backspace key, do this:

echo '(gtk_accel_path "/ShellActions/Up" "BackSpace")' >> ~/.config/nautilus/accels
| improve this answer | |
  • @Jorge Castro: you may need to add <Actions> to the proposed command: echo ' (gtk_accel_path "<Actions>/ShellActions/Up" "BackSpace") >> ~/.config/nautilus/accels – alex Aug 3 '16 at 10:39
1

2019 - For Nautilus:
Based on @riclc/nautilus_backspace repo, I wrote a shell script to install the necessary packages and scripts to bring back this function. I use it with Fedora 30, but the script would work for distros that using apt and pacman too.

wget -qO- https://raw.githubusercontent.com/7aman/backspace-up/master/install.sh | bash
| improve this answer | |
  • 1
    I tried manually adding the function in accels file and didn't work, I reviewed the code of this before run, saw nothing nasty, and IT WORKED. Thx, you saved me time. – m3nda Jan 23 at 5:57
1

2020 - For Nautilus 3.30.5 (on Debian Buster and Gnome 3.30.2)

Based on nautilus-backspace You need to install nautilus-python and then place a python script in .local/share/nautilus-python/extensions/.

Install python-nautilus using this:

# apt-get install python-nautilus

You may need to create the directory as well.

$ mkdir -p .local/share/nautilus-python/extensions

Now, navigate to the newly created directory:

$ cd .local/share/nautilus-python/extensions

Download the script:

$ wget https://raw.githubusercontent.com/riclc/nautilus_backspace/master/BackspaceBack.py

finally, restart nautilus using:

killall nautilus
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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