On 14-May-99 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.
Check for the "DISPLAY" variable. It should be set if the script is ran under X.
It's not a perfect solution as it is possible for "DISPLAY" to be set even when
you're on a console, but if the "DISPLAY" variable is set and "X" is running,
it shouldn't make a lot of difference one way or another.
Cort
[EMAIL PROTECTED]