On Thu, 22 Feb 2001, Scott Harrison wrote:

> I am running dia-0.84-6 on RedHat 6.2 (wow I love dia, it sure
> beats my years with fig3.2 and GD).

First of all, you should upgrade to a newer version of dia.

> 
> I'm trying to use it in batch mode with the -e option (for
> on-the-fly web app) However, it still insists on trying to open
> the display.
> 
> Gtk-WARNING **: cannot open display

Unfortunately, Dia requires an X display to perform all font metric
calculations, so a display is still required in batch export mode.  This
is not likely to change in the future.

> 
> I've tried a number of the dia command line arguments.. can't
> seem to do it that way.  I can do it from a console (non-X)
> screen with export DISPLAY, however this requires previously
> logging in through gdm.
> 
> Yet, that STILL won't work through the cgi layer 
> 
> Xlib: connection to "my.computer.somewhere:3.0" refused by server
> Xlib: Client is not authorized to connect to Server
> 
> Gtk-WARNING **: cannot open display: my.computer.somewhere:3

This is probably because you haven't transfered the authentication tokens
to the ~/.Xauthority file of the user the cgi script is running at.  Look
at the xauth manpage about how to do this (you will probably want "xauth
list" and "xauth merge").  Alternatively, you can just open up your X
server with "xhost +the.host.where.the.cgi.is.running", which would allow
all users from that host to connect to your display.

> 
> Is there any better way to isolate this most
> desired dia->ps conversion.
> 
> In the tarballs I see things like paginate_psprint.c, yet
> there is a lot of GTK type things going in there.
> 
> I suppose I will have to dig around with things like xon/xauth.
> 
> Please any better ideas, or proven ways to get it to work
> with/without the X server? -Scott

One other option is to run an Xvnc server which the cgi can connect to,
and use it for font metrics.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


Reply via email to