1 |
One way is test if $DISPLAY is set, if it is then you are running in X |
2 |
|
3 |
On Sat, 2004-12-04 at 13:34 -0800, Kevin O'Gorman wrote: |
4 |
> Is there a way for a script (bash, for instance) to know |
5 |
> if it's running under X, such as in an xterm or konsole? |
6 |
> |
7 |
> I want to have scripts that run graphical tools if the |
8 |
> infrastructure is present, and text tools otherwise. |
9 |
> For me this is particularly useful for tools I don't use |
10 |
> all that often, and can forget that a graphical version |
11 |
> exists. |
12 |
> |
13 |
> ++ kevin |
14 |
> |
15 |
-- |
16 |
Nick Rout <nick@×××××××.nz> |
17 |
|
18 |
|
19 |
-- |
20 |
gentoo-user@g.o mailing list |