LXDE: Add Keyboard Shortcut For Open Terminal With One Button

Using terminal very often it is convenient to start terminal with some keyboard shortcut, for example with just pressing Right Menu button (right button with logo). This is how to do that.

LXDE works with Openbox, so there is a file ~/.config/openbox/lxde-rc.xml with some configurations, also there are Keyboard shortcuts:

 

1. Edit ~/.config/openbox/lxde-rc.xml

Open file for editing with vim or any editor like gedit, mousepad or so:

vim ~/.config/openbox/lxde-rc.xml

Find section that looks like keybindings and add two new ones:

<!-- Keybindings for desktop switching -->
  <!-- my openlxterminal with right menu button -->
  <keybind key="Menu">
    <action name="Execute"><command>lxterminal</command></action>
  </keybind>
  <keybind key="C-A-t">
    <action name="Execute"><command>lxterminal</command></action>
  </keybind>

 

First entry adds shortcut for "Menu" button, it opens lxterminal.

Second opens lxterminal with combination Ctrl + Alt + t.

 

2. openbox --reconfigure

Run this for apply new settings:

openbox --reconfigure

 

Now, you can try to start lxterminal with Right menu button or with combination Ctrl + Alt + t.

 

Links

1. Source: https://superuser.com/questions/807047/how-to-add-a-shortcut-key-to-the…

2. Openbox keys: http://openbox.org/wiki/Help:Bindings

3. ArchWiki Openbox https://wiki.archlinux.org/title/Openbox

Section
Category