Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!brunix!cs.brown.edu!jsb From: jsb@cs.brown.edu (John Bazik) Newsgroups: comp.windows.x Subject: Re: Summary: Detecting which window system Message-ID: <73109@brunix.UUCP> Date: 22 Apr 91 20:51:30 GMT References: <1015@epiwrl.UUCP> Sender: news@brunix.UUCP Organization: Brown Computer Science Dept. Lines: 20 In article <1015@epiwrl.UUCP>, nelson@wrl.epi.com (Ken Nelson) writes: |> |> Here's a common algorithm based on environment variables: |> |> if $DISPLAY is defined |> then you're running X windows. |> elif $WINDOW_PARENT is defined |> then you're running sunview. |> elif $NEWS_SERVER is defined |> then you're running Sun NeWS. |> else You're not using a window system I'm familiar with. |> |> I don't know how to distinguish Sun's xnews vs. MIT's X server, but |> I'm sure a similar mechanism exists. We check for $OPENWINHOME to differentiate X/NeWS from X11R4. It's defined for the former. Useful for setting font paths. John Bazik jsb@cs.brown.edu