From: Kevin O'Gorman <kogorman@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Can a script tell if it's running under X?
Date: Sat, 4 Dec 2004 13:34:58 -0800 [thread overview]
Message-ID: <9acccfe5041204133432d7a3e@mail.gmail.com> (raw)
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
--
Go back to the top: I almost always top-post
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list
next reply other threads:[~2004-12-04 21:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-04 21:34 Kevin O'Gorman [this message]
2004-12-04 21:43 ` [gentoo-user] Can a script tell if it's running under X? Nick Rout
2004-12-06 2:07 ` cdemarco
2004-12-06 4:19 ` Iain Buchanan
2004-12-04 21:45 ` Matan Peled
2004-12-05 0:55 ` Bastian Balthazar Bux
2004-12-04 22:54 ` Peter Gordon
2004-12-05 0:22 ` Collins Richey
2004-12-05 7:31 ` Peter Gordon
2004-12-05 15:08 ` Collins Richey
2004-12-05 8:25 ` Uwe Thiem
2004-12-05 8:27 ` Marko Vallius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9acccfe5041204133432d7a3e@mail.gmail.com \
--to=kogorman@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox