我在网上搜索了有关此错误的信息,但似乎没有人遇到过此问题。我编写了一个小 bash 脚本,每次调用它时,它都会将主题和壁纸更改为夜间/白天模式。
一切正常,只是壁纸没有改变,而是消失了。
我目前正在使用带有 gnome 的 ubuntu 19.04 disco dingo 以下是代码:
#!/bin/bash
night(){
echo "starting night mode..."
gsettings set org.gnome.desktop.interface gtk-theme "Mc-OS-MJV-Dark-Gn3.32-V.2.1"
gsettings set org.gnome.desktop.background picture-uri file:///home/Immagini/test.jpg
gnome-tweaks
}
day(){
echo "starting day mode..."
gsettings set org.gnome.desktop.interface gtk-theme "Ant-Nebula"
gsettings set org.gnome.desktop.background picture-uri file:///home/Immagini/27p.jpg
gnome-tweaks
}
help(){
cat<<_EOF_
this eBic command let me, and only me, changing my theme and backgroung when it turs out that
it's night, so it set a dark wallpaper and theme.
Comands:
light --nightmode = guess
light --daymode = guess
_EOF_
}
if [ "$1" == "--nightmode" ]; then
clear
night
exit
fi
if [ "$1" == "--daymode" ]; then
clear
day
exit
fi
if [ "$1" == "--help" ]; then
help
exit
fi
谢谢,我希望有人能解决这个问题。
PS抱歉,我的英文不好
答案1
问题由 Jos 解决。文件路径必须放在单引号之间,而我将其放在双引号之间。