Re: FVWM: Restoring keyboard/mouse settings on USB plug
Le Mon, 26 Jul 2021 10:15:08 +0100 (BST), Mark Hills a écrit : > My keyboard and mouse are on a USB hub, powered on/off separately. > I'm tired of having to manually re-run a script every time I return > to work. > > Searching gives suggestions to add scripts to Linux udev; that seems > totally the wrong layer to me -- it can only be configured by root, > runs whether X is running or not, and I'd somehow need to delegate > access to the running X session. I don't run dbus here either. This > is on simple Slackware/Alpine Linux system. I would say than the best way is to let X to manage the mouse and the pointer. As example, I have nothing special for the USB mouse, it just work, and for the keyboard I have a file /etc/X11/xorg.conf.d/30-keyboard.conf Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "ch" Option "XkbVariant" "fr" Option "XkbRules" "xorg" EndSection Dominique
Re: FVWM: Restoring keyboard/mouse settings on USB plug
On Mon, 26 Jul 2021 10:15:08 +0100 (BST) Mark Hills wrote: > Is there some kind of X event that fvwm can respond to when a new USB > input device is plugged in? You could check out the silly program I wrote to handle this exact situation. It listens for udev events. https://tomhorsley.com/software/udev-act/udev-act.html
FVWM: Restoring keyboard/mouse settings on USB plug
Is there some kind of X event that fvwm can respond to when a new USB input device is plugged in? Because I recently switched from using CorePointer/CoreKeyboard in the xorg.conf, to the 'modern' hot plugging of X devices. However, now the settings of keyboard and mouse return to the default when the devices are unplugged: "xset r", xmodmap etc. How do fvwm users typically handle this scenario? My keyboard and mouse are on a USB hub, powered on/off separately. I'm tired of having to manually re-run a script every time I return to work. Searching gives suggestions to add scripts to Linux udev; that seems totally the wrong layer to me -- it can only be configured by root, runs whether X is running or not, and I'd somehow need to delegate access to the running X session. I don't run dbus here either. This is on simple Slackware/Alpine Linux system. I'm thinking there must be a well designed solution here; the X server has acknowledged the appearance of a new device, so how can an X client (specifically fvwm) respond to this action? Many thanks -- Mark