This is a more detailed followup to the issues raised in [Solved] Looking for command line access to mate-control-center settings.
The general solution suggested there was to use gsettings rather than xinput, but should one want to configure mouse behavior in the display manager lightdm, the behavior of gsettings subsequently used in the mate desktop environment is affected in a way that can cause serious confusion. It turns out that the relationship between the two configuration utilities is fairly simple, if not at all obvious at first. I have confirmed this for mate, though as an offshoot, it is possible (but I have not verified) that the same applies to gnome. Also, I have only investigated the two settings of interest to me, namely disabling/enabling the touchpad and setting the mouse for left/right hand use and so have no idea how much the discoveries involving those two, discussed in what follows, might extend to other settings and devices. Maybe someone who knows anything about that can contribute here.
The interaction with touchpad is the simplest case:
xinput access to the touchpad is only possible from within mate if beforehand the touchpad has been enabled in gsettings:On the other hand gsettings access is not affected by the state of the xinput touchpad enable property.
For mouse "handedness" the interaction goes both ways:
Basically, control of mouse "handedness" through either of the utilities (xinput or gsettings) will only work as expected if the other is set to "right handed". To answer the question "what mouse behavior to expect under any (of the 4 possible) given combination of settings (right/left) of the two utilities", is given by a simple boolean formula.
Let g = gsetting "handedness" setting
Let x = xinput "handedness" setting
Let m = actual mouse "handedness" behavior
Defining boolean values for setting/behavior as
0 = right handed
1 = left handed
the boolean value of the actual mouse behavior m = (g ≠ x).
So the mouse behaves right-handed if g and x are equal (both left or both right) and left-handed otherwise. It is not enough to check the value in just one of the utilities to predict how the mouse will actually behave!
It is not clear to me why gsettings works this way, but at least with this understanding, it is manageable.
If anyone knows more about these peculiar interactions, especially concerning other settings and devices, please pipe in.
The general solution suggested there was to use gsettings rather than xinput, but should one want to configure mouse behavior in the display manager lightdm, the behavior of gsettings subsequently used in the mate desktop environment is affected in a way that can cause serious confusion. It turns out that the relationship between the two configuration utilities is fairly simple, if not at all obvious at first. I have confirmed this for mate, though as an offshoot, it is possible (but I have not verified) that the same applies to gnome. Also, I have only investigated the two settings of interest to me, namely disabling/enabling the touchpad and setting the mouse for left/right hand use and so have no idea how much the discoveries involving those two, discussed in what follows, might extend to other settings and devices. Maybe someone who knows anything about that can contribute here.
The interaction with touchpad is the simplest case:
xinput access to the touchpad is only possible from within mate if beforehand the touchpad has been enabled in gsettings:
Code:
gsettings set org.mate.peripherals-touchpad touchpad-enabled true
For mouse "handedness" the interaction goes both ways:
Basically, control of mouse "handedness" through either of the utilities (xinput or gsettings) will only work as expected if the other is set to "right handed". To answer the question "what mouse behavior to expect under any (of the 4 possible) given combination of settings (right/left) of the two utilities", is given by a simple boolean formula.
Let g = gsetting "handedness" setting
Let x = xinput "handedness" setting
Let m = actual mouse "handedness" behavior
Defining boolean values for setting/behavior as
0 = right handed
1 = left handed
the boolean value of the actual mouse behavior m = (g ≠ x).
So the mouse behaves right-handed if g and x are equal (both left or both right) and left-handed otherwise. It is not enough to check the value in just one of the utilities to predict how the mouse will actually behave!
It is not clear to me why gsettings works this way, but at least with this understanding, it is manageable.
If anyone knows more about these peculiar interactions, especially concerning other settings and devices, please pipe in.
Statistics: Posted by gurfle — 2024-04-11 04:02 — Replies 0 — Views 20