From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.help Subject: Re: check whether emacs session is running under local X server Date: Thu, 28 Sep 2006 03:56:42 +0200 Organization: FAU Erlangen-Nuernberg Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1159411223 31599 80.91.229.2 (28 Sep 2006 02:40:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2006 02:40:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 28 04:40:22 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GSlp0-0000hP-5z for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Sep 2006 04:40:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSloz-0001qp-LV for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Sep 2006 22:40:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-X-Trace: news.dfncis.de 5dn7X/VXkSh7nFxlSgcw/wY6HlmkuyZyEy15BQCompLvS9 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:Qs3VguEQJbVsS994XgjWBley6oI= Original-Xref: shelby.stanford.edu gnu.emacs.help:142070 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37690 Archived-At: Glenn Morris writes: >> In my .emacs I would like to distinguish between an emacs session >> running under the local X server and an emacs session running under >> a remote X server. I expect that the $DISPLAY variable can do the >> job. But I am not familiar with the details. >> (Once upon a time I set $DISPLAY manually. Nowadays I use ssh which >> handles $DISPLAY for me, but I do not understand the scheme it uses.) > > I just check whether the SSH_CLIENT environment variable is set or > not. Thanks a lot! It seems that this is exactly what I was looking for. Roland