3

How can one set a keyboard shortcut for an instance of xfce4-terminal? It appears that the Terminal->Set Title menu does not have a shortcut tooltip, and I would really like to keep my open terminals organized.

Addendum: if this is not possible within xfce4-terminal itself, maybe there is a way to do this using an OS shortcut? I am using OpenSuSe 13.2.

2

Hover over menu item and press desired keyboard combination. To remove one, hover and press Backspace. If it doesn't work, see the FAQ for pointers how to enable GTK+ shortcuts changing for you may not have it enabled. Attached screenshot from the FAQ as well.

From http://docs.xfce.org/faq, quoting here for your convenience:

A number of Xfce applications (Xfce Terminal and Thunar for example) support the standard GTK+ way of changing shortcuts: simply hover over the menu option with the mouse pointer and press the keyboard shortcut you want to rebind it to.

To delete a keyboard assignment, press the Backspace key while you are on the menu entry.

Just had same problem and found this out, I did that by accident with s and could not type commands with s cause it would ask me for a new terminal title. :D

EDIT after comment:

if the shortcut doesn't change, then you need to enable the feature in GTK+. This can be achieved in 3 ways:

If you are running the Xfce desktop environment, enable Editable menu accelerators in the User Interface Preferences dialog.
If you are running GNOME then you can enable Editable menu accelerators in the Menu and Toolbars control center dialog.
Otherwise put the following in your ~/.gtkrc-2.0 file (create the file if it doesn't exist):
gtk-can-change-accels=1

FAQ screenshot

|improve this answer|||||
  • That would be a great solution, however for me it didn't work... – Klangen Jul 5 '17 at 15:24
  • @Pickle - edited my answer with how to enable that way of changing shortcuts. – LAFK says Reinstate Monica Jul 6 '17 at 4:38
  • In Xubuntu, to get to the User Interfaces Dialog search for the Appearances dialog (at least on version Xfce 4.12) – gerardw Mar 5 '18 at 20:02
4

You can "always" set the terminal title from the command-line, since XFCE4 Terminal uses VTE, which supports the corresponding xterm title escape sequence. A simple script like this would work (setting both title and icon name):

#!/bin/sh
printf '\033]0;%s\007' "$*"

OpenSUSE also has xtermset available; it sets title or icon, e.g.,

xtermset -T "my title"

I just checked, to see that the title can be set independently on each tab (though ultimately this is a feature of VTE and can be broken by upgrades if the GNOME developers decide to deprecate it further).

However, if you are using bash, its default setting for PS1 makes it modify the title, and your changes would be lost.

Further reading:

|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.