I am creating some images using the following script. The script runs and creates the file. However I am getting an error. If I ssh into the server using the -Y it I do not receive the error.
gs -sDEVICE=pngalpha -sOutputFile=/home/pi/my_image.png -q -r200 -g200x100 -
display: unable to open X server `' @ error/display.c/DisplayImageCommand/426
I am using perl and I did set the EVN{DISPLAY}'"0.0"
still errors. However I actually don't want to display the file. Only create them and store the file in the /home/pi/
directory.
答案 0 :(得分:1)
尝试将-dSAFER -dBATCH -dNOPAUSE
添加到选项中。这些是输出到文件时使用的标准最佳实践标志。