2

I am executing the following instruction:

gsettings set org.gnome.desktop.background show-desktop-icons true

I'd like to know what changes are made in the file system by this instruction?

Please explain in which file this instruction sets some variable to value=true, so that the desktop icons are getting visible.

Jacob Vlijm
  • 83,767
techy
  • 127

1 Answers1

1

The values are stored in ~/.config/dconf/user but this is a binary and not human readable so I don't know how you would edit it.

You can view it with

xxd ~/.config/dconf/user

Source0

Source1

As requested here is a .desktop file that will run gsettings set org.gnome.desktop.background show-desktop-icons true on boot

Open a new document in a text editor and paste this in

[Desktop Entry]
Type=Application
Exec= gsettings set org.gnome.desktop.background show-desktop-icons true
X-Gnome-Auto-Start=True
Name[en_GB]=icons.desktop

Save it as icons.desktop and make it executable by right click or

chmod +x path/to/icons.desktop

Now double click icons.desktop to confirm it works.

Once you are happy it works move it to ~/.config/autostart, if it does not exist, make it

mkdir ~/.config/autostart

Now when you reboot, this will run and activate the icons, if they are already active, it will just do nothing.

Mark Kirby
  • 18,529
  • 19
  • 78
  • 114
  • I am actually creating my own ubuntu OS where I have installed gnome with lightdm. But when I test the OS image, the desktop ikons are not appearing until I execute "gsettings set org.gnome.desktop.background show-desktop-icons true". – techy Jan 09 '17 at 11:51
  • Why not add a script that turns them on at boot? #/bin/bash gsettings set org.gnome.desktop.background show-desktop-icons true and run at start up. IDK what to tell you about the ISO, I don't have enough information. – Mark Kirby Jan 09 '17 at 12:00
  • How to add shell script to run at start up ? – techy Jan 09 '17 at 12:10
  • Take your pick from these options http://askubuntu.com/questions/814/how-to-run-scripts-on-start-up It is not an elegant solution so do feel free to hold out for a better answer ;) – Mark Kirby Jan 09 '17 at 12:12
  • Thank you for the suggestion. Is there any shortcut, instead of writing a script just for

    "gsettings set org.gnome.desktop.background show-desktop-icons true"

    we can execute it in .desktop as mentioned in this link

    http://stackoverflow.com/questions/8247706/start-script-when-gnome-starts-up

    Can we write "Exec= gsettings set org.gnome.desktop.background show-desktop-icons true" ??

    – techy Jan 09 '17 at 12:43
  • Yes you can, I just tested it and it turned the icons on without a script, just a .desktop. – Mark Kirby Jan 09 '17 at 12:49
  • Can you please write the answer ? I mean what you have executed ? and in where did you added it ? – techy Jan 09 '17 at 13:04
  • Done.... @techy – Mark Kirby Jan 09 '17 at 13:13
  • 1
    To add to Mark's answer: gsettings is the cli frontend to dconf, which is the low-level editor to the dconf database. As Mark mentioned, the settings are stored in the dconf database, which is in binary format. – Jacob Vlijm Jan 09 '17 at 13:19