问题
I am running ImageMagick on my Mac which runs on Yosemite. I have just downloaded ImageMagick and I am trying to open the logo display by running this on the command line:
display logo.gif
after executing the above command, I am getting the following error:
display: unable to open X server `:0.0' @ error/display.c/DisplayImageCommand/426.
I've implemented all the steps to install ImageMagick, including executing the following command:
export DISPLAY=:0.0
and I am still not getting the display to show up. When I echo $DISPLAY, my console shows 0.0.
How can I fix this error? Any help is appreciated.
回答1:
Do not attempt to export the $DISPLAY
environment variable, as this will be set when X11 (XQuartz) is launched. On OS X, this is usually a unique unix path. Something like:
echo $DISPLAY
#=> /private/tmp/com.apple.launchd.CWOgR6ULcX/org.macosforge.xquartz:0
The best way to start X sever (IMHO) is to use Spotlight
- ⌘ + space
- Search for "
X11
" followed by ↩ - Open new terminal window & run your
display
command
来源:https://stackoverflow.com/questions/36251754/display-unable-to-open-x-server