Enable mouse back / forward buttons in KDE

Hello, welcome to my first post on this fantastic Linux blog. After the suggestion of elav in the forum, I have decided to bring you a small tutorial that may be useful for you.

Those lucky enough to have more modern mice, with extra side buttons and all those benefits of technology, will agree with me that they are much more comfortable and efficient when working intensively with files or surfing the net. In Windows, due to its huge market share, all mice work as standard without the need for further configuration (I do not know about the Mac, but presumably as well). However, in Linux, specifically with the KDE environment, they only work as standard in web browsers, so we have to tweak a couple of things to activate these buttons and be able to use them in Dolphin and, in general, in any other program that uses to the back / forward function.

The steps to follow are very simple, and are carried out in no time at all:

1) First, install the packages xautomation y xbindkeys. This can be done through the package manager of the distribution in use, so take a look in the repositories and run the corresponding command of your distro, in Arch:

 pacman -S xautomation xbindkeys

2) In the folder / home / username, create a text file called ".xbindkeysrc" -without the quotes-. The period preceding the name will make the file hidden, possibly disappearing from view immediately after creation. Mark, in the menu View, the option "show hidden files" (or press Alt +.), And locate it. Then open it with a text editor and paste all this into it:

# For the benefit of emacs users: - * - shell-script - * - ########################### # xbindkeys configuration # ## ######################### # # Version: 1.8.0 # # If you edit this file, do not forget to uncomment any lines # that you change. # The pound (#) symbol may be used anywhere for comments. # # To specify a key, you can use 'xbindkeys --key' or # 'xbindkeys --multikey' and put one of the two lines in this file. # # The format of a command line is: # "command to start" # associated key # # # A list of keys is in /usr/include/X11/keysym.h and in # / usr / include / X11 / keysymdef. h # The XK_ is not needed. # # List of modifier: # Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock), # Mod3 (CapsLock), Mod4, Mod5 (Scroll). #
# The release modifier is not a standard X modifier, but you can # use it if you want to catch release events instead of press events
# By defaults, xbindkeys does not pay attention with the modifiers # NumLock, CapsLock and ScrollLock. # Uncomment the lines above if you want to pay attention to them.
#keystate_numlock = enable #keystate_capslock = enable # keystate_scrolllock = enable
# Examples of commands:
"xbindkeys_show" control + shift + q
# dolphin go back "xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'" b: 9
# dolphin go forward "xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'" b: 8
################################### # End of xbindkeys configuration # ########## ########################

3) Once you have done the above, save the file and close the text editor. Now go to /home/user-name/.kde4/Autostart and create a new text file, called «xbindkeys.desktop»-Again without quotes-. You open it and paste the following into it:

#! / usr / bin / env xdg-open [Desktop Entry] Comment [en_US] = Comment = Encoding = UTF-8 Exec = xbindkeys GenericName [en_US] = GenericName = Icon = MimeType = Name [en_US] = Name = Path = StartupNotify = false Terminal = false TerminalOptions = Type = Application Version = 1.0 X-DBUS-ServiceName = X-DBUS-StartupType = X-DCOP-ServiceType = X-KDE-SubstituteUID = false X-KDE-Username = X-KDE-autostart -after = kdesktop

4) You don't need to change anything else. Logging out and back in should be enough for the mouse to function properly. In case you run into problems, make sure you have followed these instructions to the letter.

Note: A forum user told me that this tutorial did not work for him, so the first thing that occurs to me is to enter the Dolphin shortcut settings and modify the Back / Forward command respectively, clicking on the button framed in the image and, immediately afterwards, pressing the corresponding mouse key. If, despite everything described, you cannot activate these buttons, leave your comments and we will try to find a solution together.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Keopety said

    good friend, since you've been given the job of making the manual, I've reinstalled it out of curiosity and now if it works, but the start file "xbindkeys.desktop" I left it in "xbindkeys" the previous one gave me a failure to start, greetings and thanks

    1.    Wolf said

      I'm glad it worked out in the end. I guess each computer has its own preferences, haha. A greeting ;).

  2.   takpe said

    For openSuse I can't find the xautomation and xbindkeys packages.

    1.    Wolf said

      Googling I see that Xautomation has changed its name to Xaut in some distros. From xbindkeys I found this page:

      http://www.nongnu.org/xbindkeys/xbindkeys.html#download

      I suppose you would have to download the source code and install it following the instructions that come on that same page.

      Let's see if any openSuse user can give us a cable.

  3.   Mara said

    Just say that in Mint 12 KDE 64 bits (xautomation and xbindkeys are also in 32 bits version) without problems. In fact there is a tool in gtk to configure xbindkeys, xbindkeys-config, but it doesn't work for me. Thank you very much for the little trick, it's great.

  4.   Rayonant said

    Thank you very much, up and running! the truth is that they are the mouse buttons that I use the most.
    [Troll Mode On] Funny that Xfce and Thunar detect and use them without the need for extra "adjustments" and KDE a cutting edge environment not xD [Troll Off Mode]

  5.   Micka said

    Very useful, I had been trying to solve it for days, in my case it was curious because if they went in the browsers either Chromium or Iceweasel, they did not work with Dolphin, after installing the programs and adding the texts, I still had to configure the keys as You indicate in the capture of the background, before it did but it did not make sense since it did not detect the keystrokes to those keys, now it is solved, thank you very much 😉

  6.   exhibition said

    Thanks, it worked for me the first time. The truth is that I missed it in dolphin and had to use thunar when it came to navigating the filesystem.