[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2102.0. "Opening a display in batch mode." by ROM01::CADOLI () Mon Jan 22 1990 11:52

	Hi,

	I have written an application that uses Decwindows and VAXImage
	to add strings to a map (under VMS).

	The map is on a .DDIF file and the algorithm is:

	- Read the DDIF file (VAXIMAGE);
	- Create a pixmap (DecW);
	- Export the DDIF frame in a Bitmap and add it to the pixmap;
	- Add the strings;
	- Import the modified bitmap in a DDIF frame;
	- Save the frame in a file.

	There is no need to display anything in the screen.
	If a try to run the application in batch mode it does not
	work, because the failure is opening the graphic display.

	I defined the security items as stated in the manual, but
	the application runs from terminal or in batch mode only if 
	I have an open session on the VAXStation screen.

	The question is:

	It is possible to run the application in batch mode,
	from a VAX without graphics devices and without having an open session
	on a VAXStation screen ??

	Thank you for you help.

	Ciao,

	Michele Cadoli - SWAS Rome
T.RTitleUserPersonal
Name
DateLines
2102.1Don't XOpenDisplay()GOLLY::MILLERI need 'Deeper Understanding'Mon Jan 22 1990 20:0210
                      <<< Note 2102.0 by ROM01::CADOLI >>>
                     -< Opening a display in batch mode. >-
    
    Somewhere in your program you must be calling XOpenDisplay().  If you
    really don't need to write to the display, don't do it, and you should
    be all set.
    
    Regards,
    
    	 	== ken miller ==
2102.2And the other Xlib routines ?ROM01::CADOLIThu Jan 25 1990 03:1316
>>    Somewhere in your program you must be calling XOpenDisplay().  If you
>>    really don't need to write to the display, don't do it, and you should
>>    be all set.
    
	Sorry, but I do not understand.

	When I make reference to an Xlib routine (i.e. XCreatePixmap, 
	XLoadFont), the first parameter to pass is always a variable
	of display type.

	If I do not use the XOpenDisplay, how I can use the other Xlib 
	routines ??

	Thank you for your help.

	Michele Cadoli.
2102.3You are displayingCLTVAX::dickDick Schoeller - Failed XperimentThu Jan 25 1990 08:359
Michele,

In order to make a Pixmap, you have to communicate with a display.  It is off
screen memory associated with a display (it resides on the server side of the
wire not the client side).  If you need to open a display when there is no
one logged in on it, you need to modify the host allowed file.  There have been
other recent notes on just that topic.

Dick
2102.4you have answered your own questionAIRBAG::SWATKOElectrons are cheap. Trees are not.Thu Jan 25 1990 11:4323
Michele,

You have answered your own question.  

From .2
>	When I make reference to an Xlib routine (i.e. XCreatePixmap, 
>	XLoadFont), the first parameter to pass is always a variable
>	of display type.
>	If I do not use the XOpenDisplay, how I can use the other Xlib 
>	routines ??

Since you need to use X routines that use the display variable, you must
call XOpenDisplay.  That's the only way you can get a properly defined
display variable.  To call XOpenDisplay, you must supply a valid workstation
screen specification.

Therefore, the answer to your original question
>	It is possible to run the application without having an open session
>	on a VAXStation screen ??
is NO, you cannot run the application without having an open sessionon a
VAXStation screen.

-Mike
2102.5It ain't prettyDSGN6::SCHOELLERWho&#039;s on first?Thu Jan 25 1990 19:5314
>is NO, you cannot run the application without having an open sessionon a
>VAXStation screen.

If by "open session" you mean being logged in, that just ain't so.  If you mean
with an established connection to a server then you are right.  If you run this
application in batch, you can SET DISPLAY to an available workstation.  If you
have modified the hosts allowed file to give you access when you aren't logged
in then it will work.  Even if you have done this it will not work when someone
else is logged in.  If you want it to work when you are logged in you have to
modify your security customization to allow access from the node where the
application is running (assuming it is remote).  It ain't pretty but it'll
work.

Dick