Setting dconf values as admin

Ralf Mardorf silver.bullet at zoho.com
Wed Oct 25 12:07:25 UTC 2017



> On 25 Oct 2017, at 13:51, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> 
>> On Wed, 25 Oct 2017 13:26:26 +0200, Josef Wolf wrote:
>> https://wiki.gnome.org/action/show/Projects/dconf/SystemAdministrators?action=show&redirect=dconf%2FSystemAdministrators
> 
> Hi,
> 
> I didn't read the Wiki.
> 
>> I have created a file
>> 
>> $ sudo cat /etc/dconf/db/ibus.d/01-cfsvn-global-defaults
>> [org/gnome/desktop/background]
>> picture-uri='file:///etc/lightdm/my-wallpaper.jpg'
>> 
>> 
>> But this don't seem to have any effect. I have run "dconf update" as
>> root and as ordinary user. Still no effect.
>> 
>> Any ideas?
> 
> I don't know if or how /etc/dconf works, resp. if or how dconf update works, but you should be able to change settings for another user by running

So first become root by running

sudo -i

and then run the following ;)

> sudo -u user_name dbus-launch dconf load /org/gnome/desktop/background/ < /etc/dconf/db/ibus.d/01-cfsvn-global-defaults
> 
> or
> 
> cat /etc/dconf/db/ibus.d/01-cfsvn-global-defaults | sudo -u user_name dbus-launch dconf load /org/gnome/desktop/background/
> 
> resp. depending on the read permissions
> 
> sudo cat /etc/dconf/db/ibus.d/01-cfsvn-global-defaults | sudo -u user_name dbus-launch dconf load /org/gnome/desktop/background/

FWIW you could run it for all users by using a loop


user_name=$(getnet passwd $i | cut -d: -f1)

where i are numbers from 1000 to n.

In the above examples replace user_name with the variable $user_name .





More information about the ubuntu-users mailing list