I am trying to figure out why I can't use ghostscript or ghostview (or any other X11 applications) when I try to call them in the Terminal. I am using bash
, and I also used Fink to get the packages I need. I am using GMT (generic mapping tools), and the commands within this gmt
package that don't need x11 run perfectly fine, but when I try to display a postscript, using either the command $ gs
or $ gv
, I get these error messages, respectively:
gv: Unable to open the display.
and GPL Ghostscript 9.10: Cannot open X display ':0'.
**** Unable to open the initial device, quitting.
I have tried many edits that I've found online, such as adding editing the ~./profile
, as shown below:
test -r /sw/bin/init.sh && . /sw/bin/init.sh
. /sw/bin/init.sh
export DISPLAY=:0
The saving grace here is that if I run the same commands from gmt
in xterm (the terminal in X11), the graphic I need is created just fine. All I want to do is have X11 called through the terminal, but right now, I cannot get it working.