显示:无法打开X服务器 [英] display: unable to open X server

查看:2703
本文介绍了显示:无法打开X服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上运行ImageMagick,它运行在Yosemite上。我刚刚下载了ImageMagick,我试图通过在命令行上运行来打开徽标显示:

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.

我已经实施了安装ImageMagick的所有步骤,包括执行以下命令:

I've implemented all the steps to install ImageMagick, including executing the following command:

export DISPLAY=:0.0

我仍然没有让显示器显示出来。当我回显$ 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.

推荐答案

不要尝试导出 $ DISPLAY 环境变量,因为这将在启动X11(XQuartz)时设置。在OS X上,这通常是唯一的unix路径。类似于:

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 

启动X服务器(恕我直言)的最佳方法是使用 Spotlight

The best way to start X sever (IMHO) is to use Spotlight


  1. + space

  2. 搜索 X11 后跟

  3. 打开新的终端窗口&运行显示命令

  1. + space
  2. Search for "X11" followed by
  3. Open new terminal window & run your display command

这篇关于显示:无法打开X服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆