Greg's X configuration overview
Greg's diary
Greg's home page
HOWTO index
Google
http://www.lemis.com/grog/wip/work-in-progress.gif
Work in progress

This page is an attempt to summarize the different places that configure an X display. It should grow.

Mouse

Current (2024) versions of X don't seem to use moused any more. Use /dev/sysmouse:

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5"
EndSection

It's not clear if ZAxisMapping is of any use.

I used to include this:

    Option         "Emulate3Buttons" "yes"

But there's a better way to do this. First find the mouse or mice:

=== grog@hydra (/dev/pts/23) ~ 369 -> xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ System mouse                              id=6    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=11   [slave  pointer  (2)]
⎜   ↳ Telink 2.4G Mouse                         id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ System keyboard multiplexer               id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=9    [slave  keyboard (3)]
    ↳ vendor 0x0430 Sun USB Keyboard            id=10   [slave  keyboard (3)]

Yes, those are two mice. Next,

=== grog@hydra (/dev/pts/26) ~ 9 -> xinput list-props 11
Device 'Logitech USB Receiver':
        Device Enabled (155):   1
...
        libinput Middle Emulation Enabled (287):        0
        libinput Middle Emulation Enabled Default (288):        0

The important thing here is the number 287 in that output. Next, note the name in the initial output and enter:

# Logitech mouse: find the ID
MOUSEID=$(xinput | grep -m 1 "Logitech USB" | sed 's/^.*id=\([0-9]*\)[ \t].*$/\1/')
xinput set-prop $MOUSEID 287 1  # Logitech

If the mouse has other buttons that can be remapped, do something like:

# Logitech mouse: find the ID
MOUSEID=$(xinput | grep -m 1 "Logitech USB" | sed 's/^.*id=\([0-9]*\)[ \t].*$/\1/')
# And set middle button to 8 and 9
xinput set-button-map $MOUSEID 1 2 3 4 5 6 7 2 2 10 11 12 13 14 15 16

That's the same assignment to MOUSEID. This sets buttons 8 and 9 to return button 2.

.xinitrc

.fvwmrc

Built with Elisp scripts in /home/local/X/.fvwm.

.Xdefaults

xterm

See December 2023. Default settings are in /usr/local/lib/X11/app-defaults/XTerm.

https://forums.freebsd.org/threads/xterm-copy-paste-to-system-clipboard.91871/:

XTerm*selectToClipboard: true

https://unix.stackexchange.com/questions/225062/how-can-i-copy-text-from-xterm-awesome-debian-virtualbox


Greg's home page Greg's diary Greg's photos Copyright

Valid XHTML 1.0!

$Id: X-configuration.php,v 1.1 2024/07/09 03:48:52 grog Exp $