From: Jaime E. Cisneros V.
Subject: How do I know if I am running Common Lisp under OPENWINDOWS?
Date: 
Message-ID: <1993Apr27.222022.19243@cs.ucf.edu>
I would like to thank all those who helped me find a way to determine the
host name in Allegro Common Lisp.  Now I have another question: How do
I know if I am running Common Lisp under OPENWINDOWS?  If I do
(sys:gentenv "OPENWIN"), it will return with the path to "openwin".
However, the path is no indication that openwindows may be running.
  Any pointers will be greatly appreciated.

  Jaime Cisneros

From: Barry Margolin
Subject: Re: How do I know if I am running Common Lisp under OPENWINDOWS?
Date: 
Message-ID: <1rku9cINN248@early-bird.think.com>
In article <······················@cs.ucf.edu> ········@cs.ucf.edu (Jaime E. Cisneros V.) writes:
>I would like to thank all those who helped me find a way to determine the
>host name in Allegro Common Lisp.  Now I have another question: How do
>I know if I am running Common Lisp under OPENWINDOWS?  If I do
>(sys:gentenv "OPENWIN"), it will return with the path to "openwin".
>However, the path is no indication that openwindows may be running.
>  Any pointers will be greatly appreciated.

You can use (sys:getenv "DISPLAY") to determine whether you're running
under some flavor of X.  I'm not an OpenWindows expert so I'm not sure if
there's a way to distinguish OW from other X implementations (do you
actually need that level of distinction?); your code could try connecting
to the NeWS server, I suppose.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar
From: Christopher Hoover
Subject: Re: How do I know if I am running Common Lisp under OPENWINDOWS?
Date: 
Message-ID: <C696oz.6K8.1@cs.cmu.edu>
In article <············@early-bird.think.com> ······@think.com (Barry Margolin) writes:
>In article <······················@cs.ucf.edu> ········@cs.ucf.edu (Jaime E. Cisneros V.) writes:
>>I would like to thank all those who helped me find a way to determine the
>>host name in Allegro Common Lisp.  Now I have another question: How do
>>I know if I am running Common Lisp under OPENWINDOWS?  If I do
>>(sys:gentenv "OPENWIN"), it will return with the path to "openwin".
>>However, the path is no indication that openwindows may be running.
>>  Any pointers will be greatly appreciated.
>
>You can use (sys:getenv "DISPLAY") to determine whether you're running
>under some flavor of X.  I'm not an OpenWindows expert so I'm not sure if
>there's a way to distinguish OW from other X implementations (do you
>actually need that level of distinction?); your code could try connecting
>to the NeWS server, I suppose.

Jaime,

You didn't say, but if you are using CLX, then get your hands on an
open XLIB:DISPLAY object:
  
  -> dpy
  #<XLIB:DISPLAY :0.0:-1 (X11/NeWS - Sun Microsystems Inc. R3000)>
  -> (xlib:display-vendor dpy)
  "X11/NeWS - Sun Microsystems Inc."
  3000

XLIB:DISPLAY-VENDOR returns multiple values: the vendor string and the
vendor release number.

-- Chris.
(··@lks.csi.com)
From: Chris Richardson
Subject: Re: How do I know if I am running Common Lisp under OPENWINDOWS?
Date: 
Message-ID: <CER.93Apr28134832@vapor.Franz.COM>
You might be able to tell my looking at the properties on the root window,
perhaps by using some CLX function. For example, when mwm is running it
sets the property _MOTIF_WM_INFO. openwins might have a similar
distinguishing property.

--
-----
Chris Richardson, Franz Inc.	1995 University Avenue, Suite 275         
···@Franz.COM (internet)	Berkeley, CA  94704                       
uunet!franz!cer (uucp)		Phone: (510) 548-3600; FAX: (510) 548-8253