1 |
On Tue, Aug 01, 2006 at 03:43:12PM -0400, Philip Webb wrote: |
2 |
> 060801 John J. Foster wrote: |
3 |
> > In a bash script, how can I test whether the script itself is being run |
4 |
> > from a virtual terminal, or from an emulator like konsole within X? |
5 |
> |
6 |
> 'echo $DISPLAY' returns ':0' from Konsole, |
7 |
> but nothing from a raw terminal called up via Ctl-Alt-F2 . |
8 |
> |
9 |
Of the different methods suggested, I like this one best. |
10 |
|
11 |
Thanks to all who replied, |
12 |
festus |
13 |
-- |
14 |
Ambition is a poor excuse for not having enough sense to be lazy. |