我正在尝试使用 conkyForecastWU 设置 conky .conkyForecast.template
。我在以下位置包含预测命令.conkyrc
:
${execpi 1800 conkyForecastWU --template=~/.conkyForecast.template}
但是当我启动时,conky
我发现每秒都会出现以下错误:
Conky: Unable to load image '/tmp/'
上面的命令conkyForecastWU
生成以下输出:
${font Raleway-10:weight=thin}
${image /tmp/.conkyForecastWU-WI-Clear.gif -p 40,1000 -s 60x60}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 123,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 177,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 231,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 285,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Mostly-Cloudy.gif -p 339,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 393,1010 -s 40x40}
当我在第一行末尾添加一个空格时,错误消息以 结尾'/tmp'
,因此 conky 只读取输出的这一部分,它的长度恰好是 256 个字节:
${font Raleway-10:weight=thin}
${image /tmp/.conkyForecastWU-WI-Clear.gif -p 40,1000 -s 60x60}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 123,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 177,1010 -s 40x40}
${image /tmp/
但出了什么问题?似乎是读取输出时出现缓冲问题,但我该如何告诉 conky 读取超过 256 个字节呢?
答案1
在这里找到了解决方案:https://unix.stackexchange.com/questions/14785/conky-buffer-too-small
设置后
text_buffer_size 1024
问题解决了。