Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

We are unable to apply wallpapers, we are getting the following error. How do i fix it??

Error:

Error setting value: Can't overwrite existing read-only value: Value 
for `/desktop/gnome/background/picture_filename' 
set in a read-only source at the front of your configuration path

Output:

# cat /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml 
<?xml version="1.0"?>
<gconf>
<dir name="desktop">
    <dir name="gnome">
        <dir name="background">
            <entry name="picture_filename" mtime="1360589143" type="string">
                <stringvalue>/usr/share/backgrounds/time.jpg</stringvalue>
            </entry>
        </dir>
    </dir>
</dir>

Note: Need Command line solution, coz i need to apply it for more than 300 hosts.

I am using 10.04 LTS. I am trying to apply wallpapers to all hosts remotely via SSH. I hope previously i have set the key to mandatory and so i am not able to set new wallpapers now. I need to apply new wallpapers now.

share|improve this question

1 Answer 1

up vote 6 down vote accepted
+500

With gconf-editor (try even sudo, if needed) navigate to /desktop/gnome/background/picture_filename entry and select "Clear the key" option. Then, try again changing your wallpaper.

If this won't work, please provide your /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml content.

Edit:

Reading just now you're trying setting the wp via ssh, set the mandatory key with:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/background/picture_filename "/path/to/your/image.jpg"

Source: http://docs.oracle.com/cd/E19253-01/819-0918/gconf-0/index.html

To Set Background Preferences

To set preferences for the desktop background, you modify the values of the preference keys in the /desktop/gnome/background location. For example, to set a mandatory image for the background, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/background/picture_filename filename.png

To set a default value for this preference, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /desktop/gnome/background/picture_filename filename.png

You can also set other background preferences. For information about the other background preferences, see the desktop_gnome_background.schemas schema definition file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.