LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 03-16-2013, 12:46 AM   #1
JWJones
Member
 
Registered: Jun 2009
Location: Cascadia
Distribution: Slackware, LinuxBBQ, OpenBSD, Mac OSX
Posts: 723

Rep: Reputation: 187Reputation: 187
Thunar keybindings - help me like this file manager


I've pretty much moved my default DE to Xfce on all machines, and I'm liking it more and more. But I need to know how to configure Thunar to make use of the "page forward" and "page back" keys on the Thinkpad (rather than using alt-left arrow, alt-right arrow). This works by default in both Nautilus and PCManFM, and Dolphin can be easily configured to do so.

I have searched the forum, and the web, and cannot seem to find a way to do this. On my Debian box, I simply swapped out Thunar for PCManFM, but I really just want to find a solution for this using Thunar.
 
Old 03-16-2013, 04:10 PM   #2
dru8274
Member
 
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 36
I had the same problem with thunar too, but it is fixed for now.

Thunar uses the gtk2 library, so it should be easy enough to change hotkeys using the standard method. From the archwiki
Quote:
Enabling Customizable Keyboard Shortcuts

You can customize your GTK+ applications' keyboard shortcuts (those are called accelerators in GTK+ terminology) by hovering your mouse over a menu item and pressing your desired key combination.
However, this feature is disabled by default. So to enable it, your ~/.gtkrc-2.0 or ~/.gtkrc-2.0.mine files should contain this line
Code:
gtk-can-change-accels=1
At this point, I was able to change my hotkeys using the above method. But then for some unknown reason, they would always change back to default sometime later. So to effect a more permanent change in my hotkeys, I looked at the ~/.config/Thunar/accels.scm file. By default it looks like this
Code:
 $ head -6 ~/.config/Thunar/accels.scm
; Thunar GtkAccelMap rc-file         -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/ThunarLauncher/sendto-desktop" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/create-folder" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-menu" "")
All the lines are preceded with a semi-colon, so they are comment lines that do nothing. So to add my hotkeys, I added some uncommented lines
Code:
(gtk_accel_path "<Actions>/ThunarWindow/back" "<Primary>Left")
(gtk_accel_path "<Actions>/ThunarWindow/open-parent" "<Primary>Up")
which in my case equate to setting the hotkey for Go-->Back to Ctrl-Left, and Go-->Parent to Ctrl-Up. For that file, <Primary> equates to the ctrl key, and <Alt> is the alt-key.

And after all that, my two hotkey changes were permanent. So perhaps you can follow my method and do the same. I am still using thunar-1.2.3, whereas the latest version is 1.6 or greater. So depending on the version, your results may vary.

Happy with ur solution... then tick "yes" and mark as Solved!

Last edited by dru8274; 03-16-2013 at 04:15 PM.
 
1 members found this post helpful.
Old 03-16-2013, 05:08 PM   #3
JWJones
Member
 
Registered: Jun 2009
Location: Cascadia
Distribution: Slackware, LinuxBBQ, OpenBSD, Mac OSX
Posts: 723

Original Poster
Rep: Reputation: 187Reputation: 187
Ah, OK, I did try:

gtk-can-change-accels=1

On a live DVD session, and then hovering/changing keybinding, but it didn't work, perhaps because it was a live session. I will have to try this on my Debian and/or Slackware Xfce boxes when I return to work on Monday (running LMDE Cinnamon on the Thinkpad right now).

Thanks!

Edit: The whole point of this was to get this working on the Thinkpad, not on a desktop machine, which doesn't have the "page forward" and "page back" keys! Duh, me! OK, gonna try this now.

Last edited by JWJones; 03-16-2013 at 05:33 PM. Reason: I had a "duh" moment!
 
Old 03-16-2013, 05:47 PM   #4
JWJones
Member
 
Registered: Jun 2009
Location: Cascadia
Distribution: Slackware, LinuxBBQ, OpenBSD, Mac OSX
Posts: 723

Original Poster
Rep: Reputation: 187Reputation: 187
OK, I got this to work in a live session! Now I can transition the Thinkpad to Xfce. Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for a GUI file-manager with vim-like keybindings TobiSGD Linux - Software 3 04-23-2012 03:18 AM
Icons for Thunar file manager Alexvader Slackware 7 12-07-2009 08:04 AM
Thunar file manager has problems: xubuntu 8.10 Intrepid ibex Shashank_Rashpa Ubuntu 1 02-04-2009 12:54 AM
Thunar as default file manager ? slax Linux - Software 2 09-06-2008 01:51 AM
LXer: Introducing the Thunar file manager LXer Syndicated Linux News 0 06-25-2007 09:32 AM


All times are GMT -5. The time now is 11:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration