changing Shortcut assignments in ~/.config/Thunar/aacels.scm

I'm trying to change the Shortcut-Action within Thunar when I press the Return key. Stock behaviour is to go to the "last Site/Folder" or however you would call it. This could get quite fast quite messy, and i seriously don't like that.
I would love to change that to the "open parent" behaviour which is already accomplished by the Shortcut Alt+ArrowUP

I already tried to edit the ~/.config/Thunar/aacels.scm but after a Reboot/Logout&Login it always resets my changed line

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

Is it possible that their is some instance, which overwrites my accels.scm at Login? An therefore my manual tinkering in the accels.scm file just get's overwritten and therefore ignored?

Thanks to everyone

What you want to achieve can be done by changing the line you posted to

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

(a logout/login is needed after editing the ~/.config/Thunar/accels.scm file)

Bare in mind that the Return key (alternatively called Enter) is used to open the user selected directory in Thunar, in other words to cd in that directory. You'll lose that functionality if you change the above mentioned line.
Any chance you're referring to a different key than Return?

After reading your post more carefully, especially this line

I think you're referring to the Backspace key (this one).

If this is the case replace the line you posted to

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

and logout/login.

The Backspace is a navigational key just like the arrow keys.

Nothing bad happens using it.

It is very convenient that you have the Enter to navigate into a folder and just above it you navigate back.

Just as you cannot change the navigational function of the enter key you cannot change the backspace - at least to my knowledge.

But you could try defining your desired action using the Thunar menu Configure custom actions.

When you have changed your shortcuts you can reload them by using the terminal

thunar -q
1 Like

This was going to be my initial answer too. But after editing the ~/.config/Thunar/accels.scm file I was surprised to find out that you actually can change the behaviour of the mentioned keys in Thunar.

For example you can actually use Enter to go up a directory (the parent directory). This will of course disable the default behaviour of that key, that's why I asked the OP if this was the desired result.

I tried that - but my file reverted after I shutdown Thunar.

This could be caused by Thunar writing the file on exit. (I have not checked)

Sorry, first of all I meant the Backspace Key. But sadly like @linux-aarhus said as well it is overwritten after restarting Thunar or doing a Logout&Login.

Could it be possible something from the GTK Side in interfering? The file definitely is somehow editable to the system itself, because the Custom Action Script are listed as well and those are working fine.

I don't know but as I said earlier - the funtionality in the file manager's file pane is the logical choices and you are probably one of the select few wanting it a different way.

If it is a GTK matter (Gnome Tool Kit) it is at the Gnome developers mercy.

Having tried a couple of ways - the change is removed instantly upon launch of Thunar so I wouldn't spend more time on it if I were you - but I am not, so that is your choice. :slight_smile:

I changed quite a few shortcuts for Thunar in the accels.scm file and they persist after rebooting.
I even assigned the mentioned shortcut to Enter and it worked - I don't recommend it though :slightly_smiling_face:.

It also worked when using the latest Xfce ISO (18.1.0-rc9) in a live environment (I can't test it in a VM at the moment).

There has to be some configuration somewhere that causes the issue you both are describing.

You can also look for (and at) all of the accels.scm files on your machine.

locate accsels.scm

@anon27588196 I have only one accels.scm within Thunar's .config folder.

OK, I think I found a solution BUT I don't know why it works. I shutdown and booted, but didn't Login as a User via LightDisplayManager, instead I used tty2 did the modification of the accels.scm with nano in the console, afterwards directly shutdown.

Now Thunar seemly to keep my modification and everything is fine. Is it possible that Thunar somehow has a daughter/parent process which is accessing the file directly after logging in into my Account via LDM?

From an old Manjaro XFCE install:

find /mnt/merell -name accels.scm

Don't use it (or XFCE) anymore, and I don't know how they interact with each other.

But, glad that you found a fix.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by