Le Mon, 26 Jul 2021 10:15:08 +0100 (BST),
Mark Hills <m...@xwax.org> 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


Reply via email to