I have a new mouse which runs on bluetooth, but I had to setup the middle mouse button manually using xinput --set-button-map
. This isn't persistent after reboot, so I wrote a small python script to run it automatically after login. Unfortunately, it doesn't work because there is some delay before the mouse automatically reconnects after login.
I thought of just adding some wait into my script, but I'm sure there must be a better way to do this. Can I hook into connect events from /usr/sbin/bluetoothd
or something like that instead?
/usr/share/
for X11 user config. (I thought the same thing, actually, so I proposed an edit for this answer. Then 3 seconds later I found that wiki page. oops!) – Austin Adams Jul 19 '15 at 02:18/etc/X11/xorg.conf.d/
, and Xorg applied a config file I placed there. (why did I doubt the manpage?!) The question, then, is if/etc/
is a better choice for user configuration than/usr/share/
. In principle, I'd say "absolutely," but I don't use Ubuntu. What do you think, @wim? – Austin Adams Jul 27 '15 at 02:25/usr/share/X11
ever stops working someone can feel free to edit my answer. – wim Jul 27 '15 at 11:07DO NOT EDIT THIS FILE, your distribution will likely overwrite
it when updating. Copy (and rename) this file into
/etc/X11/xorg.conf.d first.
– Dessa Simpson Sep 09 '16 at 02:19.xsession
etc only worked on login, but was reset to defaults after resume – Matija Nalis Aug 21 '17 at 20:08