Updating USB TrackBall settings

Helpful advice for updating a Trackball’s buttons in qubes 4.1

First I am relatively new to qubes os. I recognize that this OS is for experienced users and isn’t for beginners like me. But why start learning to play a guitar with 4 strings when you know that you want to play one with 6? Once you learn the basic configurations it is nice to have disposable VMs to practice other configurations and to test software without crapping out a traditional install. Enough of that.

I wanted to change the scroll functionality of my ELECOM HUGE Trackball. I read through the guide at Elecom Huge Linux Review and Configuration

And did the following from a terminal in dom0
$ cd /usr/share/X11/xorg.conf.d
$ sudo cp 40-libinput.conf 40-libinput.bak
$ sudo vim 40-libinput.conf

Once that file was open I edited the configuration file to contain the attributes suggested by Vashinator.

After writing and quitting the vim I restarted my system. It seems to be working as expected.

What I wanted to know is there another (preferred) way to edit libinput configuration files other than doing it at a dom0 terminal?

Thanks for the advice.

P.S. If you are very new to trying something like this I recommend using a tutorial for vim, by opening any app terminal and typing $ vimtutor

1 Like

What you did is what many folks familiar with the command line would prefer. (Certainly what I would prefer.)

You can try different editors to find your favorite, but if you’re happy with vim, it has the advantage of being readily available in dom0 when you need it; and the choice of editor is a matter of personal preference, not good or bad practice, so that’s for you to say. :slightly_smiling_face:

1 Like

Unfortunately i currenly also like that elecom huge better than the Classic Trackball - Ploopy (which has QMK support!). It seems to me, to be because of the soft gel pad.

So you added a X11 configuration to enable scrolling with the trackball, that could be quite nice. Would be nice if it could be a toggle. Ooh, this seems to do that: libinput(4) — Arch manual pages “ScrollButtonLock”

An attempt to name/explain all button numbers
(using xev | grep -- button to see less of the output from xev).

1  - bottom left button
2  - push wheel in
7  - push wheel up
6  - push wheel down
4  - scroll wheel forward
5  - scroll wheel backward
9  - forward button (front top left)
8  - backward (back top left)
10 - small front (front upper left)
11 - small back (back upper left)
3  - second to most right (left of right side)
12 - most right (right of right side)

So, i will be trying out (don’t want to restart X11 right now):

(
# location="/user/share/X11/xorg.conf.d/40-libinput.conf"
location="/etc/X11/xorg.conf.d/50-trackball-elecom.conf"
test ! -e "${location?}" ||
    {
        >&2 printf 'Making a timestamped copy of "%s".' "${location?}" &&
            cp -a "${_?}" "${_%.*}.at$(
                date --utc +%+4Y%m%d%H%M%S%Z
            ).${_##*.}.old"
    }

<<'EOF' cat | >/dev/null sudo tee -a "${location?}"
Section "InputClass"
        Identifier "ELECOM TrackBall Mouse HUGE TrackBall"
        MatchProduct "ELECOM TrackBall Mouse HUGE TrackBall"
        Driver "libinput"
        Option "Scrollmethod" "button"
        Option "ScrollButton" "8"
        Option "ScrollButtonLock" true
EndSection
EOF
unset location
)

It seems to me that /etc/X11/xorg.conf.d/ is what would be preferable for user-made configurations (keeping /usr/share/.. for package(-maintainer)s, also: man xorg.conf.

Apparently

        Option "ScrollButtonLock" true

should be

        Option "ScrollButtonLock" "true"

.

Not yet working though, might need more changes between dom0/guivm & sys-usb/usbvm .

Thank you for the detailed reply. I recently did a fresh install of qubes 4.2 and am going to try working things as you suggested. I’d love to get to the point that I can do a few simple commands on install and get my specs dialed in. I’ll report back what I see with your suggestions.

This is a new approach I am taking as I work with new tech: What tools are already onboard? Can I learn them well enough to do what I intended? Can I use it to solve the problem?

I’ve been learning so much and am working with simpler systems. I really appreaciate the forums here and the focus on security. I could add 50 new programs to do the job of the 5 preinstalled and all it would do is add attack surface. Thanks for sharing