kar*_*k87 3 gnome wallpaper bash scripts
我们无法应用壁纸,我们收到以下错误。我如何解决它??
错误:
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
Run Code Online (Sandbox Code Playgroud)
输出:
# 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>
Run Code Online (Sandbox Code Playgroud)
注意: 需要命令行解决方案,因为我需要将它应用于 300 多台主机。
我正在使用 10.04 LTS。我正在尝试通过 SSH 将壁纸远程应用于所有主机。我希望之前我已将密钥设置为强制,因此我现在无法设置新壁纸。我现在需要应用新壁纸。
使用gconf-editor
(甚至尝试sudo
,如果需要)导航到/desktop/gnome/background/picture_filename
条目并选择“清除密钥”选项。然后,再次尝试更改您的壁纸。
如果这不起作用,请提供您的/etc/gconf/gconf.xml.mandatory/%gconf-tree.xml
内容。
编辑:
刚刚阅读您正在尝试通过 ssh 设置 wp,使用以下命令设置必需的密钥:
# 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"
Run Code Online (Sandbox Code Playgroud)
来源:http : //docs.oracle.com/cd/E19253-01/819-0918/gconf-0/index.html
设置背景首选项
要为桌面背景设置首选项,请修改 /desktop/gnome/background 位置中首选项键的值。例如,要为背景设置强制图像,请执行以下命令:
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/background/picture_filename filename.png
Run Code Online (Sandbox Code Playgroud)
要为此首选项设置默认值,请执行以下命令:
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /desktop/gnome/background/picture_filename filename.png
Run Code Online (Sandbox Code Playgroud)
您还可以设置其他背景首选项。有关其他背景首选项的信息,请参阅 desktop_gnome_background.schemas 架构定义文件。