Open yakshaver2000 opened 1 year ago
Initially, I thought that this could be fixed by modifying ansible-gsetting
such that its settings take effect regardless of the user's current value of XDG_CURRENT_DESKTOP
. To do that, though, we would need a way to check if a particular setting has been explicitly set or is following the default value. The gsettings
tool doesn't seem to provide any way to do that.
So maybe I'm misunderstanding how gsettings
should be used and
dconf
(and ansible-dconf) instead of gsettings
.ansible-gsetting
would be to add a new module parameter that lets me specify the XDG_CURRENT_DESKTOP
I'm expecting the user to set.
On a Debian 11 system, I found that the following code had no effect:
This happens because the default value of some GSettings depends on the environment variable
XDG_CURRENT_DESKTOP
.When
ansible-gsetting
invokesgsettings
for another user,XDG_CURRENT_DESKTOP
is unset. On my (Debian 11) system, that makes the default value of thefocus-change-on-pointer-rest
settingfalse
. Soansible-gsetting
decides to do nothing.When my user
jrandom
is logged in, however,XDG_CURRENT_DESKTOP
is set to the valueGNOME
, which changes the default offocus-change-on-pointer-rest
totrue
. So now the effective setting forjrandom
is the opposite of what's in the playbook.You can see the difference in behaviour of
gsettings
here:(I guess that happens because there is a
[org.gnome.mutter:GNOME]
section in/usr/share/glib-2.0/schemas/00_org.gnome.shell.gschema.override
which modifies the defaults of a handful of settings.)