Detect if in X

pp at info.win.tue.nl pp at info.win.tue.nl
Fri Feb 22 07:15:00 AEST 1991


Can anyone tell me if there's a way to determine if (on a SUN) I'm

1 - In Sunview
2 - In X (e.g. open look)

And are these cases destinguishable ??

As you will know starting up open windows using the "openwin" script will
define LD_LIBRARY_PATH and OPENWINHOME. Using these environment variables
would be nice, but anybody can define these environment variables, even
when not in open windows.  In fact there are situations that you will have
to define these environment variables yourself ! So that's not a certified
way to make sure you're in open windows. There also are other environment
variables (like WINDOW_PARENT) that indicate you are in open windows OR
sunview, but you can't distinguish which one.....

So the question above is still valid.....
Any help is appreciated.

| Peter Peters                              | UUCP  : pp at win.tue.nl     |
| Eindhoven University of Technology (TUE)  | PHONE : +31-(0)40-474120  |
| Dept. of Mathematics and Computer Science | TUE   : HG 8.82 / 4120    |
| Disclaimer : I said WHAT ???              | VHF   : pa0ppe            |



More information about the Comp.sys.sun mailing list