Gentoo Archives: gentoo-user

From: dg <dg@××××××××××.ru>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Test for X from cli
Date: Tue, 01 Aug 2006 23:04:51
Message-Id: 200608012337.17665.dg@kaboom.spb.ru
In Reply to: [gentoo-user] Test for X from cli by "John J. Foster"
1 On Tuesday 01 August 2006 23:20, John J. Foster wrote:
2 > Good afternoon,
3 >
4 > In a bash script, how can I test whether the script itself is being
5 > run from a virtual terminal, or from an emulator like konsole within X?
6 >
7 > Thanks,
8 > festus
9
10 Hi,
11
12 One possible solution would be to check the value of $TERM variable... If it
13 is 'xterm' then you're probably in the X terminal emulator.
14
15 BR,
16 dmitri
17 --
18 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Test for X from cli "John J. Foster" <Gentoo-User@××××××××××××.com>