+ -
当前位置:首页 → 问答吧 → gnome3.2上图不多说

gnome3.2上图不多说

时间:2011-01-23

来源:互联网

附件:

Screenshot.jpg [ 180.74 KiB | 被浏览 11 次 ]


代码:
#!/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.

作者: 黄美姬   发布时间: 2011-01-23

重装系统后读不到图片了,我没有动过任何文件myconky里的文件,
是定制安装的系统,是不是少装了什么,除了imagemagick还有哪个是必需的

作者: 黄美姬   发布时间: 2011-01-23

附件:

Screenshot.jpg [ 180.74 KiB | 被浏览 12 次 ]


代码:
#!/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.

作者: 黄美姬   发布时间: 2011-01-23

重装系统后读不到图片了,我没有动过任何文件myconky里的文件,
是定制安装的系统,是不是少装了什么,除了imagemagick还有哪个是必需的

作者: 黄美姬   发布时间: 2011-01-23