Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Interaction between gsettings and xinput configurations of mouse and touchpad in mate

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Interaction between gsettings and xinput configurations of mouse and touchpad in mate

#1 Post by gurfle »

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:

Code: Select all

gsettings set org.mate.peripherals-touchpad touchpad-enabled true
On the other hand gsettings access is not affected by the use of xinput to change the touchpad enable property.
It is also important to understand that the touchpad "enabled" state reported by xinput is changed to the state set by gsettings, but not the other way around, i.e. changing the touchpad "enabled " state using xinput does not change the state reported by gsettings.

To answer the question "what actual touchpad behavior to expect under any of the possible combinations of touchpad enabled settings (true or false) reported by the two utilities", consider the following boolean "enabled state" variables:

Let G = gsetting reported state (1 = enabled, 0 = disabled)
Let X = xinput reported state (1 = enabled, 0 = disabled)
Let M = actual touchpad state (1 = enabled, 0 = disabled)

Then (for boolean "and") it turns out that M = (G and X).
There are in fact only 3 possible combinations of G and X, since X = 1 cannot occur when G = 0.

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". The answer to the question "what actual mouse behavior to expect under any of the (4 possible) given combinations of settings (right/left) reported by the two utilities", is given by a simple boolean formula.

Let g = gsetting reported "handedness" setting
Let x = xinput reported "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). Recall the formula the touchpad was the slightly different boolean M = (G and 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.

Post Reply