This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: export DISPLAY={localWorkstationIP} in mintty


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

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]