From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32589 invoked from network); 6 Dec 2004 04:20:06 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 6 Dec 2004 04:20:06 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.41) id 1CbAM2-0008Kf-O4 for arch-gentoo-user@lists.gentoo.org; Mon, 06 Dec 2004 04:20:06 +0000 Received: (qmail 22068 invoked by uid 89); 6 Dec 2004 04:19:49 +0000 Mailing-List: contact gentoo-user-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-user@lists.gentoo.org X-BeenThere: gentoo-user@gentoo.org Received: (qmail 712 invoked from network); 6 Dec 2004 04:19:47 +0000 From: Iain Buchanan To: gentoo-user@lists.gentoo.org In-Reply-To: <20041206020748.GA30358@bugs.md.com.my> References: <9acccfe5041204133432d7a3e@mail.gmail.com> <1102196585.10364.6.camel@sf.rout.dyndns.org> <20041206020748.GA30358@bugs.md.com.my> Content-Type: text/plain Date: Mon, 06 Dec 2004 13:49:33 +0930 Message-Id: <1102306773.19641.17.camel@orpheus> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit Subject: Re: [gentoo-user] Can a script tell if it's running under X? X-Archives-Salt: 935158f7-8403-424b-bde8-c4069e8d73e0 X-Archives-Hash: 52a3dbb6e9a61967013c2ba0add3f9b1 On Mon, 2004-12-06 at 10:07 +0800, cdemarco@fastmail.fm wrote: > On Sun, Dec 05, 2004 at 10:43:05AM +1300, Nick Rout wrote: > > > One way is test if $DISPLAY is set, if it is then you are running in > > X > > If you login via SSH and have X forwarding enabled, you might not want > to burn bandwidth on an X app. If you don't want to use X in this case, then you probably won't have $DISPLAY set :) Its a good idea IMHO to stick to conventions - how annoying would it be if each app had its own $DISPLAY like variable that you had to set? You can always add a --nox or -nw or whatever (like emacs etc) if the user wants to override it... HTH, -- Iain Buchanan You know you're using the computer too much when: u type amd instead of and -- DEaigo -- gentoo-user@gentoo.org mailing list