Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-user
Matan Peled wrote:
> Kevin O'Gorman wrote:
>
>> Is there a way for a script (bash, for instance) to know
>> if it's running under X, such as in an xterm or konsole?
>>
>> I want to have scripts that run graphical tools if the
>> infrastructure is present, and text tools otherwise.
>> For me this is particularly useful for tools I don't use
>> all that often, and can forget that a graphical version
>> exists.
>>
>> ++ kevin
>>
>>
>>
> Another way would be to check ${TERM} - on a tty, its "linux", and in
> X it specifies the terminal emulator (rxvt, xterm, Eterm, etc.).
dangerous, if you login via telnet or ssh it's a choiche of the client
and thae coise is pretty large
--
gentoo-user@g.o mailing list
|
|