[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Am I running under X?

From: Eric D. Hendrickson
Subject: Re: Am I running under X?
Date: Thu, 28 Jul 2005 10:16:38 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Write a script something like this, and call it "screen".  Or call it
"myscreen".  Or whatever...


# if no DISPLAY variable, then we are not in X

# DISPLAY might not be the best environment variable to test for but
# it should work

if [ -z "$DISPLAY" ]; then
  exec /usr/bin/screen blah
  exec /usr/bin/screen blah2

address@hidden writes:

> How can I tell if I'm running under X in a shell script?  If I'm in X, I
> want to start screen:  screen -m -c /my/config/file.  If I'm not under X,
> I want to start without the -m.  It's an odd google to find the answer to
> this question, so your wisdom is appreicated.
> -judd maltin
> _______________________________________________
> screen-users mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]