分页: 1 / 1

conky不能画图了

发表于 : 2011-01-23 12:33
黄美姬
Screenshot.jpg

代码: 全选

#!/bin/bash
#
# Photo in conky
# by helmuthdu and paulvictor
#source="~/.myconky/pics"
photo=/tmp/conkyPhoto.png

#cd $source
cd ~/.myconky/pics
number=$(ls -R | wc -l)
random=$RANDOM
random=${random}%${number}
lines=`echo ${random} + 2 | bc`
filename=`ls | head -n $lines | tail -n 1`

	cp $filename $photo
line 13: filename=`ls | head -n $lines | tail -n 1`
janker@sars:~$ /home/janker/.myconky/bin/conkyStart
Conky: desktop window (1a000a7) is subwindow of root window (101)
Conky: window type - override
Conky: drawing to created window (0x3800001)
Conky: drawing to double buffer
/home/janker/.myconky/bin/conkyPhotoRandom: line 13: bc:找不到命令
head:选项需要一个参数 -- n
请尝试执行"head --help"来获取更多信息。
cp: 在"/tmp/conkyPhoto.png" 后缺少了要操作的目标文件
请尝试执行"cp --help"来获取更多信息。
identify: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
identify: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.
identify: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
identify: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.
/home/janker/.myconky/bin/conkyPhotoRandom: line 18: - : 语法出错:此处需要运算符 (error token is "- ")
/home/janker/.myconky/bin/conkyPhotoRandom: 第 20 行: [: :此处需要整数表达式
/home/janker/.myconky/bin/conkyPhotoRandom: 第 23 行: [: :此处需要整数表达式
convert: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/conkyPhoto.png' @ convert.c/ConvertImageCommand/2838.
identify: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
identify: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.
convert: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.
convert: missing an image filename `/tmp/conkyPhoto.png' @ convert.c/ConvertImageCommand/2838.
convert: unable to open image `/tmp/conkyPhoto.png': 没有那个文件或目录 @ blob.c/OpenBlob/2480.
convert: unable to open file `/tmp/conkyPhoto.png' @ png.c/ReadPNGImage/2917.

Re: conky不能画图了

发表于 : 2011-01-23 12:38
黄美姬
重装系统后读不到图片了,我没有动过任何文件myconky里的文件,
是定制安装的系统,是不是少装了什么,除了imagemagick还有哪个是必需的

Re: conky不能画图了

发表于 : 2011-01-24 23:27
黄美姬
有人知??

Re: conky不能画图了

发表于 : 2011-01-24 23:34
JiangHui
安装 bc

Re: conky不能画图了

发表于 : 2011-01-25 11:03
黄美姬
晚上回去试试,安装bc,我看行

Re: conky不能画图了

发表于 : 2011-01-25 12:57
eexpress
lines=`echo ${random} + 2 | bc`

bash本身就可以作这算术,还bc。这谁写的。

Re: conky不能画图了

发表于 : 2011-01-26 1:10
黄美姬
果然
Screenshot-1.png

Re: conky不能画图了

发表于 : 2011-01-31 18:17
chs513
求楼主 conky 的全部配置 [email protected]