1 |
John J. Foster wrote: |
2 |
> On Tue, Aug 01, 2006 at 03:43:12PM -0400, Philip Webb wrote: |
3 |
>> 060801 John J. Foster wrote: |
4 |
>>> In a bash script, how can I test whether the script itself is being run |
5 |
>>> from a virtual terminal, or from an emulator like konsole within X? |
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 |
This will also be set in ssh sessions with X forwarding turned on. You |
12 |
might want to check whether you're in one of those as well. |
13 |
|
14 |
Thanks, |
15 |
Donnie |
16 |
-- |
17 |
gentoo-user@g.o mailing list |