Linux unable to open X server

时间:2018-06-19 11:11:47

标签: bash perl ghostscript

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.

1 个答案:

答案 0 :(得分:1)

尝试将-dSAFER -dBATCH -dNOPAUSE添加到选项中。这些是输出到文件时使用的标准最佳实践标志。