Onn a typical linux system, DISPLAY is set in X, but not in console
shells. This is not particularly portable: it is possible to set
DISPLAY anywhere, and I do it in /etc/profile, so I can start X apps
from a console, but generally it is true. SHLVL would tell you if it is
a login shell, but would not I think distinguish xdm from text console.
Lawson
>< Microsoft free environment
This mail client runs on Wine. Your mileage may vary.
On Fri, 14 May 1999, David Pounder wrote:
> Is it possible for a shell script to be able to determine whether it
> has been invoked from within X (either from a shell window or a KDE
> link) or from a text console.
>
> I considered using ps with grep but that would only tell me whether X
> is running - not necessarily the same thing.
>
> Suggestions would be welcome.
>
> Many thanks in advance.
>
> Dave.
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
>
>
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]