| 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.
|
| 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).
|