Gsettings - Monitor All System Settings Change

Normally I monitor all the schema changes in settings using dconf watch /.

gsettings monitor can also monitor changes. However, the problem with gsettings monitor is it can track only one schema at a time (not all the schema like dconf watch /).

is dconf watch / reliable?

How can I use gsettings monitor to track all schemas changes in my machine.

The dconf watch / command is (hopefully) reliable… for what it does, So watching changes written in the database managed by the dconf daemon. The changes done on schema using another backend (like, things written in a keyfile) will not appear here (that’s an unusual case, but it happens, I think GNOME Web uses that trick notably for things related to web applications).

You probably know about it, but gsettings list-schemas will allow you to… list schemas. So you can probably start monitoring every of it that way. But I don’t know much about the monitor function, so I won’t help you here (regarding its behaviour with relocatable schemas, notably).

By the way, why do you want to do that? I can help a bit if you want to write a program doing that, using the GSettings API (maintainer of Dconf Editor here).

… and flatpak (maybe snap?)

Can’t say I’d heard of gsettings monitor before but it seems unlikely to work for non-dconf (how would it know about keyfile?)

(side note: dconf-editor’s adaptiveness is awesome)

I considered that’s mostly expected that a containerized application would not edit a locally installed database, so I skipped it. But yes, that’s how Flatpak at least saves applications settings also.

No idea how it works at all. :smiley: You’re probably right: gsettings is designed to be quite low-level, it’s unlikely it includes things for real-life use-cases; it’s a technical tool, doing technical things. I planned at one point to do a better CLI tool with the same base as Dconf Editor (that for example keeps a list of bindings for relocatable schemas…), but I’m more working on various games currently.

I hope it’s not the only thing. :smiley: But thanks!

What I am trying to do is:

  1. Install Linux.
  2. while making the in settings (GUI), monitor what changes I have made in gsettings.
  3. create a bash script to restore the settings.

That way I do not have to go through the GUI every time I install Linux in a machine.

I do not want to:

dconf dump / > backup_of_my_cinnamon_settings
dconf load / < backup_of_my_cinnamon_settings

As I might have to restore the settings to different version of the OS.

That’s usually not a problem: having never-used settings should not cause you any issues (else, you probably should report it as a bug). But anyway.

I’d honestly just go with a manual cleaning of the dconf dump / output. That way, you’ll be sure of what is happening for real.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.