Re: Am I running under X?

2005-07-28 Thread Stephane Chazelas
On Thu, Jul 28, 2005 at 10:55:03AM -0400, [EMAIL PROTECTED] wrote: > 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 > thi

Re: Am I running under X?

2005-07-28 Thread Eric D. Hendrickson
Write a script something like this, and call it "screen". Or call it "myscreen". Or whatever... #!/bin/sh # 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

Re: Am I running under X?

2005-07-28 Thread Andy Goth
On Thu, Jul 28, 2005 at 10:55:03AM -0400, [EMAIL PROTECTED] wrote: > How can I tell if I'm running under X in a shell script? Check to see if $DISPLAY is set. -- Andy Goth + [EMAIL PROTECTED] + http://ioioio.net/ ___ screen-users mailing list scr

Re: Am I running under X?

2005-07-28 Thread Dan Mahoney, System Admin
On Thu, 28 Jul 2005 [EMAIL PROTECTED] wrote: 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

Am I running under X?

2005-07-28 Thread screen-users
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