Gentoo Logo
Gentoo Spaceship




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
Navigation:
Lists: gentoo-user: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-user@g.o
From: cdemarco@...
Subject: Re: Can a script tell if it's running under X?
Date: Mon, 6 Dec 2004 10:07:48 +0800
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.


The *safest* way IMHO is to set an env var, e.g. "GOT_X='yes'" in your
.xsession/.xinitrc!


-- 
% You are in a maze of twisty passages, all alike.
Christopher DeMarco <cdemarco@...>          
PGP public key ID 0x2E76CF5C @ pgp.mit.edu
+6012 232 2106
Attachment:
pgp7DGQT8OhQI.pgp (PGP signature)
Replies:
Re: Can a script tell if it's running under X?
-- Iain Buchanan
References:
Can a script tell if it's running under X?
-- Kevin O'Gorman
Re: Can a script tell if it's running under X?
-- Nick Rout
Navigation:
Lists: gentoo-user: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Can a script tell if it's running under X?
Next by thread:
Re: Can a script tell if it's running under X?
Previous by date:
Cable Link
Next by date:
Re: (Possibly) a problem with gcc


Updated May 04, 2012

Summary: Archive of the gentoo-user mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.