Gentoo Archives: gentoo-user

From: Kevin O'Gorman <kogorman@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Can a script tell if it's running under X?
Date: Sat, 04 Dec 2004 21:35:15
Message-Id: 9acccfe5041204133432d7a3e@mail.gmail.com
1 Is there a way for a script (bash, for instance) to know
2 if it's running under X, such as in an xterm or konsole?
3
4 I want to have scripts that run graphical tools if the
5 infrastructure is present, and text tools otherwise.
6 For me this is particularly useful for tools I don't use
7 all that often, and can forget that a graphical version
8 exists.
9
10 ++ kevin
11
12 --
13 Go back to the top: I almost always top-post
14 Kevin O'Gorman, PhD
15
16 --
17 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Can a script tell if it's running under X? Nick Rout <nick@×××××××.nz>
Re: [gentoo-user] Can a script tell if it's running under X? Matan Peled <chaosite@×××××.com>
Re: [gentoo-user] Can a script tell if it's running under X? Peter Gordon <admin@×××××××××××××××××.com>