在我安装的 Manjaro Linux 的 Xfce 上运行 Python 脚本自动更改背景时,脚本偶尔会抛出以下错误:
** (xfdesktop:13267): CRITICAL **: 16:18:15.893: xfdesktop: 已经在运行,正在退出。
我已将错误原因缩小到xfdesktop --reload
脚本以下行中的命令:
subprocess.Popen(['xfdesktop --reload'], shell=True)
在普通终端中的脚本之外运行相同的命令会产生相同的行为;它会工作几次,然后抛出上述错误。任何其他xfdesktop
命令也会引发错误(除了xfdesktop -V
)
手动杀死xfdesktop
进程htop
可以让命令多工作几次,但几分钟后不可避免地会再次抛出错误。
我正在运行 Manjaro 18.0.2。这是输出xfdesktop -V
:
This is xfdesktop version 4.13.2git-UNKNOWN, running on Xfce 4.13.
Built with GTK+ 3.24.2, linked with GTK+ 3.24.2.
Build options:
Desktop Menu: enabled
Desktop Icons: enabled
Desktop File Icons: enabled
有没有人有任何理由xfdesktop
这样做,我能做些什么来阻止它抛出这些错误?