delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/02/21:38:00

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=BAYES_00,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: export DISPLAY={localWorkstationIP} in mintty
Date: Thu, 02 Sep 2010 18:37:30 -0700
Lines: 44
Message-ID: <i5pjgq$q3v$1@dough.gmane.org>
References: <29609361 DOT post AT talk DOT nabble DOT com> <29609623 DOT post AT talk DOT nabble DOT com> <4C80273D DOT 3030401 AT bopp DOT net>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lightning/1.0b2 Lanikai/3.1.3pre
In-Reply-To: <4C80273D.3030401@bopp.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

  On 09/02/2010 03:37 PM, Jeremy Bopp wrote:
> On 9/2/2010 5:12 PM, PaulHR wrote:
>> I got the standard error.....
>> Error: Can't open display:
>>
>> I made sure xWin Server was running
>> Did a -vvv on the ssh and saw nothing for X11
>>
>> What else can I look at?
> It would be really helpful if you included a little context from earlier
> bits of the conversation to which you are responding.  I'm going to
> assume that you responded to my message suggesting you use the -X option
> to ssh. ;-)
>
> It's possible that the corresponding server-side option to allow that
> feature is disabled.  If so, you could try to reconfigure the ssh
> server.  The option to enable is named X11Forwarding and it should be
> set to "yes".  If you are not allowed to do that, then your only option
> is to go back to your original idea of figuring out your local IP.  This
> will require a bit more effort on your part.
>
> When you connect to the remote machine, there should be an environment
> variable named SSH_CLIENT set.  It appears to be a space delimited list
> where the first item is your client's IP address.  Given that and
> assuming your shell is bash on the server, you can use the following to
> set the DISPLAY environment variable after you open your connection:
>
> export DISPLAY=$(echo $SSH_CLIENT | cut -d' ' -f1):0
>
> If that works for you, you may want to put it in your .bashrc or
> .bash_profile script on the server side so that it happens automatically
> every time you connect.
>
> -Jeremy
>
It's been my experience that if you do not have DISPLAY set before you 
ssh then you will not have it set after you ssh (usually to 
localhost:<n> where n is usually not 0).

BTW don't put the IP address in DISPLAY - just set it to DISPLAY=:0.

BTW2 X is an awful heavy process to run if your aim is merely to run 
ASCII terminals. Instead use mintty (or rxvt) and -e ssh <remote host> 
instead.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019