Failing to configure keyborad shortcuts for xfce4-terminal

Report Bugs, Issues and non- package Requests
Message
Author
bli
Posts: 5
Joined: Wed Feb 28, 2018 5:23 am

Failing to configure keyborad shortcuts for xfce4-terminal

#1 Post by bli »

Quite some time ago, I remember it was possible to configure keyboard shortcuts for the Terminal simply by typing the shortcut while hovering the mouse over the corresponding menu entry, provided so called "accelerators were enabled.

The "Appearance" setting application contains a "Setting" tab where an "Enable editable accelerators" option exists, but it seems to have no effect on keyboard shortcuts (their menu entry are grey and pressing the desired shortcut when hovering over it doesn't change them).

This post proposes to do this by editing the

Code: Select all

~/.config/xfce4/terminal/accels.scm
file:
https://askubuntu.com/questions/966877/ ... -shortcuts

However, this does not seem to work for me: The "Previous Tab" and "Next Tab" shortcuts are still "Shift+Left" and "Shift+Right" even after doing the following edits:

Code: Select all

; (gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Right")
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Left")
(gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Page_Down")
Is this supposed to work in MXLinux, and under what conditions?


I'm using MXLinux, that I installed from MX-17_January_x64.iso:

Code: Select all

System:    Host: latimeria Kernel: 4.14.0-3-amd64 x86_64 bits: 64
           Desktop: Xfce 4.12.3 Distro: MX-17_x64 Horizon December 15, 2017
Machine:   Device: laptop System: Dell product: Latitude 7480 serial: N/A
           Mobo: Dell model: 00F6D3 v: A00 serial: N/A
           UEFI [Legacy]: Dell v: 1.7.3 date: 11/10/2017

User avatar
dolphin_oracle
Developer
Posts: 20023
Joined: Sun Dec 16, 2007 1:17 pm

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#2 Post by dolphin_oracle »

since the migration to gtk3 has started, some of the in-gui editing of accelerators has been disabled/removed, because unlike gtk2, gtk3 does not support editable accelerators.

I'm curious about your text snippet of your accels.scm file. Our defaults have "Primary + Page_up" and "Primary + Page_down" for next and previous tabs, respectively. Primary on my keyboard is the control key.

That said, I was able to make the adjustment you describe without issue.

My modified accels.scm is below.

I've also noticed a tendency for xfce ignore config file entries, sometimes in total, sometimes up to the point of a typo in the file. So look not only at the entries you are trying to modify, but other entries as well.

Code: Select all

; xfce4-terminal GtkAccelMap rc-file         -*- scheme -*-
; this file is an automated accelerator map dump
;
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>4")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>3")
; (gtk_accel_path "<Actions>/terminal-window/file-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-other-tabs" "")
; (gtk_accel_path "<Actions>/terminal-window/search" "<Primary><Shift>f")
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Right")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>1")
; (gtk_accel_path "<Actions>/terminal-window/show-menubar" "")
; (gtk_accel_path "<Actions>/terminal-window/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/terminal-window/terminal-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-window" "<Primary><Shift>q")
; (gtk_accel_path "<Actions>/terminal-window/close-tab" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/terminal-window/save-contents" "")
; (gtk_accel_path "<Actions>/terminal-window/new-tab" "<Primary><Shift>t")
; (gtk_accel_path "<Actions>/terminal-window/view-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/show-toolbar" "")
; (gtk_accel_path "<Actions>/terminal-window/paste" "<Primary><Shift>v")
; (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary><Shift>c")
; (gtk_accel_path "<Actions>/terminal-window/edit-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/fullscreen" "F11")
; (gtk_accel_path "<Actions>/terminal-window/read-only" "")
; (gtk_accel_path "<Actions>/terminal-window/detach-tab" "<Primary><Shift>d")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>8")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>2")
 (gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Left")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Primary><Shift>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/terminal-window/search-prev" "")
; (gtk_accel_path "<Actions>/terminal-window/reset-and-clear" "")
; (gtk_accel_path "<Actions>/terminal-window/about" "")
; (gtk_accel_path "<Actions>/terminal-window/search-next" "")
(gtk_accel_path "<Actions>/terminal-window/toggle-menubar" "F10")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>7")
; (gtk_accel_path "<Actions>/terminal-window/select-all" "<Primary><Shift>a")
; (gtk_accel_path "<Actions>/terminal-window/help-menu" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>9")
; (gtk_accel_path "<Actions>/terminal-window/show-borders" "")
; (gtk_accel_path "<Actions>/terminal-window/preferences" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>6")
; (gtk_accel_path "<Actions>/terminal-window/contents" "F1")
; (gtk_accel_path "<Actions>/terminal-window/new-window" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Primary><Shift>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/zoom-out" "<Primary>minus")
; (gtk_accel_path "<Actions>/terminal-window/set-title" "<Primary><Shift>s")
; (gtk_accel_path "<Actions>/terminal-window/paste-selection" "")
; (gtk_accel_path "<Actions>/terminal-window/undo-close-tab" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>5")
; (gtk_accel_path "<Actions>/terminal-window/zoom-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/reset" "")
; (gtk_accel_path "<Actions>/terminal-window/tabs-menu" "")
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

bli
Posts: 5
Joined: Wed Feb 28, 2018 5:23 am

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#3 Post by bli »

Thanks for your quick answer.

My xfce4 config was copied from an older installation (Xubuntu 16.04 on another computer), where the original entries were:

Code: Select all

(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Right")
and

Code: Select all

(gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Left")
I tried to use the file you provide, in order to avoid possible typos, simply using "Page_Up" instead of "Right" for the "next-tab" action, and this has apparently no effect on the shortcuts, even after opening new terminals.

My problem must be somewhere else...
System: Host: latimeria Kernel: 4.14.0-3-amd64 x86_64 bits: 64
Desktop: Xfce 4.12.3 Distro: MX-17_x64 Horizon December 15, 2017
Machine: Device: laptop System: Dell product: Latitude 7480

bli
Posts: 5
Joined: Wed Feb 28, 2018 5:23 am

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#4 Post by bli »

To see if the "accels.scm" file was read by xfce4-terminal, I tried to apply the technique used here:
https://unix.stackexchange.com/q/18844/55127

It seems that this program does not read the file. Is there something to configure somewhere in order to have it be the case?
System: Host: latimeria Kernel: 4.14.0-3-amd64 x86_64 bits: 64
Desktop: Xfce 4.12.3 Distro: MX-17_x64 Horizon December 15, 2017
Machine: Device: laptop System: Dell product: Latitude 7480

User avatar
dolphin_oracle
Developer
Posts: 20023
Joined: Sun Dec 16, 2007 1:17 pm

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#5 Post by dolphin_oracle »

I think you should post your entire file.

My accels.scm file is certainly being processed. Here's mine revised again with your Page_Up and Page_Down

Code: Select all

; xfce4-terminal GtkAccelMap rc-file         -*- scheme -*-
; this file is an automated accelerator map dump
;
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>4")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>3")
; (gtk_accel_path "<Actions>/terminal-window/file-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-other-tabs" "")
; (gtk_accel_path "<Actions>/terminal-window/search" "<Primary><Shift>f")
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Page_Up")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>1")
; (gtk_accel_path "<Actions>/terminal-window/show-menubar" "")
; (gtk_accel_path "<Actions>/terminal-window/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/terminal-window/terminal-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-window" "<Primary><Shift>q")
; (gtk_accel_path "<Actions>/terminal-window/close-tab" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/terminal-window/save-contents" "")
; (gtk_accel_path "<Actions>/terminal-window/new-tab" "<Primary><Shift>t")
; (gtk_accel_path "<Actions>/terminal-window/view-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/show-toolbar" "")
; (gtk_accel_path "<Actions>/terminal-window/paste" "<Primary><Shift>v")
; (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary><Shift>c")
; (gtk_accel_path "<Actions>/terminal-window/edit-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/fullscreen" "F11")
; (gtk_accel_path "<Actions>/terminal-window/read-only" "")
; (gtk_accel_path "<Actions>/terminal-window/detach-tab" "<Primary><Shift>d")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>8")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>2")
 (gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Primary><Shift>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/terminal-window/search-prev" "")
; (gtk_accel_path "<Actions>/terminal-window/reset-and-clear" "")
; (gtk_accel_path "<Actions>/terminal-window/about" "")
; (gtk_accel_path "<Actions>/terminal-window/search-next" "")
(gtk_accel_path "<Actions>/terminal-window/toggle-menubar" "F10")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>7")
; (gtk_accel_path "<Actions>/terminal-window/select-all" "<Primary><Shift>a")
; (gtk_accel_path "<Actions>/terminal-window/help-menu" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>9")
; (gtk_accel_path "<Actions>/terminal-window/show-borders" "")
; (gtk_accel_path "<Actions>/terminal-window/preferences" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>6")
; (gtk_accel_path "<Actions>/terminal-window/contents" "F1")
; (gtk_accel_path "<Actions>/terminal-window/new-window" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Primary><Shift>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/zoom-out" "<Primary>minus")
; (gtk_accel_path "<Actions>/terminal-window/set-title" "<Primary><Shift>s")
; (gtk_accel_path "<Actions>/terminal-window/paste-selection" "")
; (gtk_accel_path "<Actions>/terminal-window/undo-close-tab" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>5")
; (gtk_accel_path "<Actions>/terminal-window/zoom-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/reset" "")
; (gtk_accel_path "<Actions>/terminal-window/tabs-menu" "")
I tried to use the file you provide, in order to avoid possible typos, simply using "Page_Up" instead of "Right" for the "next-tab" action, and this has apparently no effect on the shortcuts, even after opening new terminals.
FYI, you will need to close any running terminal before your changes will take place.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

bli
Posts: 5
Joined: Wed Feb 28, 2018 5:23 am

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#6 Post by bli »

I just copied the file you posted:

Code: Select all

bli@latimeria:~$ cat .config/xfce4/terminal/accels.scm
; xfce4-terminal GtkAccelMap rc-file         -*- scheme -*-
; this file is an automated accelerator map dump
;
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>4")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>3")
; (gtk_accel_path "<Actions>/terminal-window/file-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-other-tabs" "")
; (gtk_accel_path "<Actions>/terminal-window/search" "<Primary><Shift>f")
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Shift>Page_Up")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>1")
; (gtk_accel_path "<Actions>/terminal-window/show-menubar" "")
; (gtk_accel_path "<Actions>/terminal-window/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/terminal-window/terminal-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/close-window" "<Primary><Shift>q")
; (gtk_accel_path "<Actions>/terminal-window/close-tab" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/terminal-window/save-contents" "")
; (gtk_accel_path "<Actions>/terminal-window/new-tab" "<Primary><Shift>t")
; (gtk_accel_path "<Actions>/terminal-window/view-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/show-toolbar" "")
; (gtk_accel_path "<Actions>/terminal-window/paste" "<Primary><Shift>v")
; (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary><Shift>c")
; (gtk_accel_path "<Actions>/terminal-window/edit-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/fullscreen" "F11")
; (gtk_accel_path "<Actions>/terminal-window/read-only" "")
; (gtk_accel_path "<Actions>/terminal-window/detach-tab" "<Primary><Shift>d")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>8")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>2")
(gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Shift>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Primary><Shift>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/terminal-window/search-prev" "")
; (gtk_accel_path "<Actions>/terminal-window/reset-and-clear" "")
; (gtk_accel_path "<Actions>/terminal-window/about" "")
; (gtk_accel_path "<Actions>/terminal-window/search-next" "")
(gtk_accel_path "<Actions>/terminal-window/toggle-menubar" "F10")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>7")
; (gtk_accel_path "<Actions>/terminal-window/select-all" "<Primary><Shift>a")
; (gtk_accel_path "<Actions>/terminal-window/help-menu" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>9")
; (gtk_accel_path "<Actions>/terminal-window/show-borders" "")
; (gtk_accel_path "<Actions>/terminal-window/preferences" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>6")
; (gtk_accel_path "<Actions>/terminal-window/contents" "F1")
; (gtk_accel_path "<Actions>/terminal-window/new-window" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Primary><Shift>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/zoom-out" "<Primary>minus")
; (gtk_accel_path "<Actions>/terminal-window/set-title" "<Primary><Shift>s")
; (gtk_accel_path "<Actions>/terminal-window/paste-selection" "")
; (gtk_accel_path "<Actions>/terminal-window/undo-close-tab" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>5")
; (gtk_accel_path "<Actions>/terminal-window/zoom-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/reset" "")
; (gtk_accel_path "<Actions>/terminal-window/tabs-menu" "")

Adn here is the terminalrc file:

Code: Select all

bli@latimeria:~$ cat .config/xfce4/terminal/terminalrc 
[Configuration]
FontName=Liberation Mono 11
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=FALSE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
MiscScrollAlternateScreen=TRUE
ColorBackground=#1f1f1f1f1f1f
ColorForeground=#dcdcdcdccccc
ColorPalette1=#3f3f3f3f3f3f
ColorPalette2=#e8e893939393
ColorPalette3=#9e9ecece9e9e
ColorPalette4=#f0f0dfdfafaf
ColorPalette5=#8c8cd0d0d3d3
ColorPalette6=#c0c0bebed1d1
ColorPalette7=#dfdfafaf8f8f
ColorPalette8=#efefefefefef
ColorPalette9=#3f3f3f3f3f3f
ColorPalette10=#e8e893939393
ColorPalette11=#9e9ecece9e9e
ColorPalette12=#f0f0dfdfafaf
ColorPalette13=#8c8cd0d0d3d3
ColorPalette14=#c0c0bebed1d1
ColorPalette15=#dfdfafaf8f8f
ColorCursor=#8f8fafaf9f9f
ColorPalette16=#efefefefefef
ScrollingOnOutput=FALSE
MiscBellUrgent=FALSE
MiscMouseWheelZoom=TRUE
MiscMiddleClickOpensUri=FALSE
MiscCopyOnSelect=FALSE
MiscDefaultWorkingDir=
MiscRewrapOnResize=TRUE
MiscUseShiftArrowsToScroll=FALSE
MiscSlimTabs=FALSE
TitleMode=TERMINAL_TITLE_PREPEND
ShortcutsNoHelpkey=TRUE
This one has effects: If I change

Code: Select all

MiscAlwaysShowTabs
to TRUE, I do get a tab bar when I open a new terminal.
System: Host: latimeria Kernel: 4.14.0-3-amd64 x86_64 bits: 64
Desktop: Xfce 4.12.3 Distro: MX-17_x64 Horizon December 15, 2017
Machine: Device: laptop System: Dell product: Latitude 7480

bli
Posts: 5
Joined: Wed Feb 28, 2018 5:23 am

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#7 Post by bli »

After a reboot, the shortcuts changes have been taken into account.

I thought simply starting a new terminal would have been enough...
System: Host: latimeria Kernel: 4.14.0-3-amd64 x86_64 bits: 64
Desktop: Xfce 4.12.3 Distro: MX-17_x64 Horizon December 15, 2017
Machine: Device: laptop System: Dell product: Latitude 7480

User avatar
dolphin_oracle
Developer
Posts: 20023
Joined: Sun Dec 16, 2007 1:17 pm

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#8 Post by dolphin_oracle »

bli wrote:After a reboot, the shortcuts changes have been taken into account.

I thought simply starting a new terminal would have been enough...
interesting, its supposed to be just starting a terminal.

YOu didn't by any chance have a dropdown-terminal at any point did you. those don't close when they vanish.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

rickc
Posts: 24
Joined: Tue Jan 23, 2018 5:01 pm

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#9 Post by rickc »

I've got this problem too. Having come from world of buntus, I'm used to ctrl/act/t for terminal

Using gnome. The keyboard shortcuts in settings allow me to change other things but not the terminal. I've now added terminal to the dock so I'll survive!

User avatar
Jerry3904
Administrator
Posts: 21956
Joined: Wed Jul 19, 2006 6:13 am

Re: Failing to configure keyborad shortcuts for xfce4-terminal

#10 Post by Jerry3904 »

I'm used to ctrl/act/t for terminal
You can just define it in Settings > Keyboard > Application Shortcuts, as image shows
You do not have the required permissions to view the files attached to this post.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “Bugs and Non-Package Requests Forum”