delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/07/18:37:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <41155986.2020506@alltel.net>
Date: Sat, 07 Aug 2004 17:36:54 -0500
From: Ken Dibble <kdibbleNOSPAM AT alltel DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
MIME-Version: 1.0
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: how can I set $REMOTEHOST ( so I can set $DISPLAY with sshd w\X11 forwarding)
References: <loom DOT 20040807T035049-115 AT post DOT gmane DOT org> <41150C47 DOT 6030900 AT alltel DOT net> <loom DOT 20040807T232016-729 AT post DOT gmane DOT org>
In-Reply-To: <loom.20040807T232016-729@post.gmane.org>


peter waltman wrote:

>Ken Dibble <kdibbleNOSPAM <at> alltel.net> writes:
>
>  
>
>>I'm not 100 % sure what you are saying.
>>Are you trying to say that the cygwin sshd does not respect the -X and 
>>-Y flags
>>passed to the local ssh process?
>>And that for the above named reason you are forced to manually set the 
>>DISPLAY variable?
>>
>>regards,
>>ken
>>
>>
>>peter waltman wrote:
>>
>>    
>>
>>>hi -
>>>
>>>trying to figure out how to set $REMOTEHOST when I ssh into a machine running
>>>cygwin's imp. of sshd.  X11 forwarding works great when I set the $DISPLAY
>>>properly, but I'd like to have it done in the .bashrc file (by checking if the
>>>$REMOTEHOST var is set).
>>>
>>>I've tried looking through the startup scripts on both my cygwin install and a
>>>rh9 box, but can't find where it gets set.  can anyone point me in the right
>>>direction?
>>>
>>>
>>> 
>>>
>>>      
>>>
>>    
>>
>
>
>yeah.  pretty much.  I've set the "ForwardX11 yes" in the sshd_config file on
>the server I log into and I've also set it in the ssh_config with the client I'm
>using to log into it.
>

and you sent the sshd a SIGHUP to re-read the config file after making 
the changes, right?

>
>   piano{pwaltman}51: ssh -X grad107m
>   pwaltman AT grad107m's password:
>   Last login: Fri Aug  6 19:16:42 2004 from lin04.eecs.tufts.edu
>
>   pwaltman AT GRAD107M ~
>   $ echo $DISPLAY
>   127.0.0.1:0
>
>even when I use the -X flag, it still set's my $DISPLAY to the above value and
>when I start an X11 app, like xterm, it ends up getting launched in the server's
>x-server and appears on the desktop of the server (grad107m).  If I set the
>$DISPLAY to localhost:10.0, everything works fine and it appears on the client.
>
>not sure why, ergo the reason I want to use the $REMOTEHOST var as a means to
>check if I've ssh'd in remotely and then use something like
>
>if $?REMOTEHOST
>   export DISPLAY=$REMOTEHOST:0.0
>
>thanks for any ideas,
>
>Peter
>
>p.s. forgive the shell script syntax errors.  I don't remember the exact script,
>but I've seen folks who've done it this way.  
>
>
>  
>


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

- Raw text -


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