在 Ubuntu 20.04 中,我使用自定义 png 文件以图形方式显示 CPU 使用情况、磁盘空间等的统计信息作为背景图像。将图像设置为背景效果很好(右键单击桌面 -> 设置 -> 背景 -> 添加图片)。
然而,当修改图像时,背景并没有更新;即使重新启动后。(在Ubuntu 18.04中是这样的)
如何让Ubuntu在底层镜像文件发生变化时自动更新背景?
凌乱的解决方案:
根据 Vikki 和 vanadiums 的回复,我发现了一个有效的 hack:
cd ~/.local/share/backgrounds
rm ./<copy_of_the_background_file>
ln -s <path_to_original_background_file> ./<copy_of_the_background_file>
Run Code Online (Sandbox Code Playgroud)
安装一个 crontab 来执行
touch -h ~/.local/share/backgrounds/<copy_of_the_background_file>
Run Code Online (Sandbox Code Playgroud)
定期(例如每分钟左右)。
这样,如果<path_to_original_background_file>被新版本覆盖,符号链接将指向新文件。
有谁知道更清洁的方法吗?有没有办法修改gnome查找背景图片的路径?