[OS X] unable to open X server

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mel_

[OS X] unable to open X server

Post by mel_ »

Hi there,

I just installed imagemagic and have problems running the example:

1. convert logo: logo.gif
2. identify logo.gif
3. display logo.gif

1+2 passing without error, 3rd produces: "unable to open X server"
The X server ist installed, startet and the command "display -display :0" displays a logo and a file open dialog.
But why does "display xyz" not work?

Any Suggestions?

Markus
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: [OS X] unable to open X server

Post by magick »

You can set the DISPLAY environment variable to :0 to fix the problem. The default is to set the X11 server to NULL and this works fine on Linux boxes but gives an exception under Mac OS X.
mel_

Re: [OS X] unable to open X server

Post by mel_ »

Thank you, that was the problem
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: [OS X] unable to open X server

Post by anthony »

You need two things.. Where is your display. that is the 'DISPLAY' environment variable.
the other is permission to display. and that is xauth, and xhost.

If you are remote you also need access to the display. ssh -x will
provide that access, set DISPLAY and set xauth appropriatally, if permitted!

See http://www.cit.gu.edu.au/~anthony/info/X/Display.needs
Also look at the links at the bottom of the very first section.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply