Re: XForms: launching X applications

Steve Lamont (
Thu, 4 Sep 97 17:42:42 PDT

To subscribers of the xforms list from (Steve Lamont) :

> I just want to include a button on one of my forms that runs an external X
> program. I have a callback function attached to this button that just
> forks a new process and runs the application in this child process.
> Unfortunately, the child process can't open the X display for some reason.
> If, I were to try to run xv for instance, I would get an error like "xv
> can't open display" or something.

The exact error message would be helpful. You might check to see if
the DISPLAY environment variable is passed correctly.

This worked perfectly for me in an admittedly quick test:

void launch_cb(FL_OBJECT *ob, long data)

if ( fork() == 0 )
execl( "/usr/X11R6.1/bin/xv", "xv", NULL );


To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: