[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

3097.0. "How do you find if x-window is running" by GIDDAY::LIM () Thu Jul 19 1990 01:39

    Can someone tell me how do you find out from a system routine that X
    window in that system. There must be some logical defined to say that X
    window  is running, but which one?
    
    thanks
    Tiong
T.RTitleUserPersonal
Name
DateLines
3097.1JAMMER::JACKMarty JackThu Jul 19 1990 10:016
    If you want to find out whether DECwindows is running at all, check the
    SYSGEN parameter WINDOW_SYSTEM for being equal to 1.
    
    If you want to find out whether a particular application should present
    a DECwindows or terminal interface, translate the logical name
    DECW$DISPLAY.  If it's defined, you're running under DECwindows.
3097.2look for X$X0VINO::MCARLETONReality; what a concept!Thu Jul 19 1990 12:0910
    
    If you want to know if a DECwindows server is running on the system you
    can ask NCP if the X$X0 object exists:
    
    $ MCR NCP SHOW OBJECT X$X0
    
    If the node is remote try:
    
    $ MCR NCP TELL nodename SHOW OBJECT X$X0
    
3097.3Use Marty's methodSTAR::VATNEPeter Vatne, VMS DevelopmentThu Jul 19 1990 14:2217
As you can see by the two previous answers, there are different ways
to find out of x-windows is running.  However, which answer you should
use really depends on what you plan to do with the information.

If you plan to use the information to decide whether you should attempt
to use DECwindows, then Marty's second answer is the best.  If the
logical name DECW$DISPLAY is defined, then you should attempt to use
DECwindows.  This is better than checking the SYSGEN parameter WINDOW_SYSTEM,
as the application may be running on a non-workstation system, but the
display may be directed to some remote workstation.  Having DECW$DISPLAY
defined is no guarantee that the remote system has DECwindows running,
but you should let the return status from OPEN DISPLAY tell you that.

Note that testing for object X$X0 only works in a DECnet environment.
It is entirely possible to set up VMS DECwindows to only use local
and TCP/IP for transports (I expect this to be a common configuration
in mixed-vendor environments).