persistent change to 40-libinput.conf

Hi,

I just changed from openSUSE 13.2 to Tumbleweed on a Fujitsi-Siemens E8010. I need emulation of a third mouse button (for example to do simple copy/paste of text), and in 13.2 I was doing this by an entry in file 10-evdev.conf, adding the respective information to the pointer device configuration. In Tumbleweed the pointer device is configured in 40-libinput.conf, and indeed, I can get the emulation by adding an option line to result in


Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
    Option "Middle Emulation" "On"
        Driver "libinput"
EndSection

works fine … but during updates the file might be overwritten (as happened today when package xf86-input-libinput was updated). As a consequence, the option is gone and after a reboot the mouse button emulation does no longer work.

I wonder if there is a place where the additional option can safely be included.
I gues I could probably add

xinput --set-prop "12" "libinput Middle Emulation Enabled" 1

(where “12” is the device id of the “PS/2 Generic Mouse” as shown by

xinput --list

) to the .xinitrc file in my home directory, but this would have to be done per user, and I would prefer a system wide solution.
Thanks in advance for any help and suggestions.

Don’t edit the file (provided by xf86-input-libinput) directly, just make a copy and call it something else eg /etc/X11/xorg.conf.d/80-custom.conf

solved - works fine - thank you!

I assume that this file would almost never be changed.

If so, then you can remove the write permissions on the file.

TSU

thanks also, TSU, for the additional idea. However, I might stick with the first solution, because it does not rely on the assumption that the file does not change.