[XForms] Using Xform in background without display

Jens Thoms Toerring jt at toerring.de
Thu Mar 13 07:26:46 EDT 2008


To subscribers of the xforms list

Hi,

> I have developped since several years a data visualization application
> that uses Xforms as GUI. In some circumstances, I would like to run this
> application in background (producing just jpg files, without user
> interaction and without showing any xform window) on a machine which has
> no display. But I get stucked on the fl_initialize function.
> With the following error message:
>      Can't open display --No such file or directory
>      Missing or failed fl_initialize()
> 
> For now, I have overcome the problem by using xvfb when starting the
> application. But could the next release of Xform provide an API or a flag
> that allows to run temporarily without display?
> Or could the next release separate in fl_initialize what is specific xform
> init from what is related to the display?

That's going to be a bit difficult because XForms is suposed to
work with a display. Hardly anything useful can be done without
one, and trying to separate out the small number of functions
that may be usable without having an open display would probably
be a huge amount of work (actually, if that would be possible
and any usuful functionality would remain in the resulting
subset, it probably should be put into a separate library;-)

Are you actually using anything from XForms when you want the
program to run without any graphics output? If not, then perhaps
a solution like I am using it myself in such circumstances would
be to avoid calling fl_initialize() at all. I do that by going
through the command line arguments first, looking for a certain
option (in my case I use '-nw'). If I find that I don't don't call
fl_initialize() (or any other functions from XForms), otherwise
I pass on the command line arguments unchanged to fl_initialize().

Having a command line argument that tells fl_initialize() that
XForms isn't going to be used sounds a bit strange to me. It
would be similar to having a function e.g. in the math library
to tell it that no function of this library will ever be used.

Or am I misunderstanding what you are trying to do?

                              Regards, Jens
-- 
  \   Jens Thoms Toerring  ________      jt at toerring.de
   \_______________________________      http://toerring.de
_______________________________________________
To unsubscribe, send any message to
xforms-leave at bob.usuhs.mil or see: 
http://cweblog.usuhs.mil/mailman/listinfo/xforms
List Archive: http://bob.usuhs.mil/pipermail/xforms and
http://bob.usuhs.mil/mailserv/list-archives/
Development: http://savannah.nongnu.org/files/?group=xforms



More information about the Xforms mailing list