0

With a basic gsettings command such as, for example, gsettings set org.gnome.desktop.secreensaver lock-enabled true, I could easily turn it into a dconf config by just replacing the dots with slashes like this:

[org/gnome/desktop/screensaver]
lock-enabled=true

I'm trying to do something similar but with a more complicated gsettings command, and I'm not seeing how to correctly format it. The command is:

$ gsettings set org.gnome.settings-daemon.plugins.sharing.service:/org/gnome/settings-daemon/plugins/sharing/gnome-remote-desktop/ enabled-connections "['myuuidhere']"

This command activates Gnome's remote desktop sharing feature for the user that runs it, but for certain reasons I require it to be enabled by default without a user needing to do anything by hand (the file will be programmatically generated with the correct UUID along with other necessary settings, I'm just having trouble getting this specific command into a dconf-usable format).

1 Answer 1

1

The gsettings command stores the configuration in dconf, the dconf dump command can be used to dump path in dconf to stdout in a keyfile-like format.

$ dconf dump /org/gnome/settings-daemon/plugins/sharing/gnome-remote-desktop/
[/]
enabled-connections=['myuuidhere']

The result can be loaded to a desired dconf path using dconf load.

Using heredoc
$ dconf load /org/gnome/settings-daemon/plugins/sharing/gnome-remote-desktop/ << EOF
[/]
enabled-connections=['myuuidhere']
EOF
From a file

$ dconf load /org/gnome/settings-daemon/plugins/sharing/gnome-remote-desktop/ < configuration.dconf

notes

  • The dump result uses the relative path as section header, but this should not affect the functionality of dconf load.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .