I am running mathematica in a script on a linux box. I construct a
graphic and then try to export it to a .tif or .pdf. The script hangs
with a:
"Xlib: connection to ":0.0" refused by server Xlib: No protocol
specified Can't open display ":0.0" and doesn't finish.
-------
For example, in script.m:
graphic = Plot[Sin[x],{x,0,1}];
Export["temp.tif",graphic]
Quit[]
-----
-----
From shell:
path_to_math/math -script script.m
------
Does anyone know of a work-around?
Thanks, Craig
Under Linux, it is possible to run the front end against a virtual server such
as Xvfb or Xvnc. I won't say anything more about installing or configuring
these programs (although the webMathematica documentation, available freely
online, does discuss this a bit). But if you want to pursue this option, let me
know and I can give you some pointers about how to configure their usage from
within Mathematica. I don't have the information conveniently at my fingertips,
but it's not difficult for me to dig it up if you need it.
Incidentally, my preferred method for searching MathGroup is to go to
groups.google.com, click "Advanced Groups Search" in the upper right-hand
corner, and then doing a search constrained by setting the "Group" field to
comp.soft-sys.math.mathematica.
Sincerely,
John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.
(*) Prior to version 6, the kernel always rendered graphics into PostScript, and
standalone exporters could be written because it merely required writing a
renderer that understood a small subset of PostScript. That ability still
exists somewhat in version 8, and can be accessed by executing
"<<Version5`Graphics`". However, many of the visualizations generated by
functionality newly added since version 6 are not supported by the legacy
system. And I'm not sure that the matching legacy export systems have been
maintained.