How to Enable 3-Buttons mouse option through Hal

From Salix OS
Jump to: navigation, search

HAL was depreciated in Salix OS 14. Therefore this article applies only to Salix OS version(s) 13.37 and earlier.

Activating the three buttons emulation on your mouse is possible by enabling Emulate3Buttons option through Xorg or through Hal. Traditionally the file xorg.conf has always been the place for video and Input devices configuration. Although is still possible to configure quite everything in xorg.conf the Xorg usually relates on Hal for input devices configuration. As the Xorg version in Salix 13.0 can autoconfigure itself and the input device managing is demanded to hal this means that you shouldn't need the xorg.conf file anymore.


If you are using Xfce than the keyboard layout is managed by the xfce4-keyboard-settings and it is stored in the xfce session. So everytime you login your keyboard layout of choice is set.

For every other window manager you should check the documentation.

Example: In openbox it is possible to configure the keyboard layout by putting inside .config/openbox/ the line:

setxkbmap ch fr # this sets the keyboard layout to Swiss French

This file is read by the openbox-session which is launched by gdm. If you don't use gdm then choose your window manager by using xwmconfig or by creating the file ~/.xinitrc:

exec openbox-session


To disable the emulation through Xorg remove the file /etc/X11/xorg.conf or comment the line:

   #Option    "Emulate3Buttons" "yes"

Then copy the file /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi in the /etc/hal/fdi/policy/ directory.

cp /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi /etc/hal/fdi/policy/

Modify the /etc/hal/fdi/policy/10-x11-input.fdi file by adding the Emulate3Buttons key.

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.mouse">
     <merge key="input.x11_driver" type="string">mouse</merge>
     <match key="/org/freedesktop/Hal/devices/" string="Linux">
       <merge key="input.x11_driver" type="string">evdev</merge>
       <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
   <match key="info.capabilities" contains="input.keys">
     <merge key="input.x11_driver" type="string">keyboard</merge>
     <match key="/org/freedesktop/Hal/devices/" string="Linux">
       <merge key="input.x11_driver" type="string">evdev</merge>

Restart Xorg and Hal and the emulation should work.