From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.help Subject: Re: check whether emacs session is running under local X server Date: Wed, 27 Sep 2006 18:10:23 -0700 Organization: None 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 1159407655 23808 80.91.229.2 (28 Sep 2006 01:40:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2006 01:40:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 28 03:40:45 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 1GSkt5-0004ch-Pr for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Sep 2006 03:40:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSkt5-0005V2-5V for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Sep 2006 21:40:31 -0400 Original-Path: shelby.stanford.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 11 Original-NNTP-Posting-Host: xoc2.stanford.edu Original-X-Trace: news.Stanford.EDU 1159405823 29034 171.64.56.22 (28 Sep 2006 01:10:24 GMT) Original-X-Complaints-To: news@news.stanford.edu X-Spook: grenades terminate Manuel Rodriguez satellite phone bomb X-Ran: *DVXLb3oKjAvZ@^$z2SI-DbPsh5{;u-E:c|eF1UqzviV8IY3Z.[fQ?8E)LACBNg\2eCXux X-Hue: red X-Attribution: GM Mail-Copies-To: nobody User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cancel-Lock: sha1:F6VN2de31nLxtoOHqEing6xuzhc= Original-Xref: shelby.stanford.edu gnu.emacs.help:142069 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:37689 Archived-At: Roland Winkler wrote: > 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.