Re: Fwd: ForwardX11 not working

2007-12-14 Thread Mirko Vukovic
On Dec 13, 2007 6:25 PM, Larry Hall (Cygwin X)
[EMAIL PROTECTED] wrote:
 Mirko Vukovic wrote:
  Hi,
 
  I have cygwin installed as a server on my desktop.  I can log into it
  from my linux box using ssh, but I cannot open displays on the linux
  box.
 
  By that I mean that if I login in using ssh, and invoke a command that
  should open a window (like gnuplot), it opens the plot on the server,
  and not on the client.
 
  Here is my setup (the cygwin distribution is a few days old).
 
  On the desktop (server),
 
   - I have ran ssh-host-config and set CYGWIN=ntsec server.  I said yes
  to privilege separation, and I have an sshd user in /etc/passwd
   - I have set DISPLAY=localhost:0.0 in .bash_profile
  ^^
 Don't do this.

  On my linux box (client), I have an ~/.ssh/config file with the lines
  in the section refering to the server: ForwardX11 yes and
  ForwardX11Trusted yes
 
  I can login to the server from both the linux box and my laptop (where
  I also have cygwin), and can run unison (which requires ssh).
 
  I read the various doc's and searched mails (does not mean I
  understood everything), which resulted in the above setup.  I am
  including the output of cygcheck.
 
  Any suggestions as to what I may have missed, or what server/client
  setting I can look at?

 See above.


 --
 Larry Hall  http://www.rfk.com
 RFK Partners, Inc.  (508) 893-9779 - RFK Office
 216 Dalton Rd.  (508) 429-6305 - FAX
 Holliston, MA 01746


Thanks Larry, but ...

I am confused with the discussion in the this post:
http://sourceware.org/ml/cygwin-xfree/2002-10/msg00071.html.  Those
guys specifically tell to have DISPLAY defined before an ssh login.

When I did the ssh login and tried gnuplot on the remote machine I
received an error: unable to open display ''.

Can you please clarify:

I have a remote machine and a local machine.  Which of them, if any
should have DISPLAY set or not set before I attempt to login and open
an X-window?

Naively, I am assuming that each machine should have a DISPLAY set,
for the simple reason that when I am physically at that machine, I
need display in order to open x-windows.

Another data point: I have a linux box.  If I login from cygwin via
ssh to the linux box (having DISPLAY already set on the cygwin side),
I can run applications on the linux box that do open new x-windows on
my cygwin machine.

Thank you,

Mirko

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



Re: Fwd: ForwardX11 not working

2007-12-14 Thread Holger Krull
Mirko Vukovic schrieb:

  - I have ran ssh-host-config and set CYGWIN=ntsec server.  I said yes
 to privilege separation, and I have an sshd user in /etc/passwd
  - I have set DISPLAY=localhost:0.0 in .bash_profile
  ^^
 Don't do this.

Really don't. Just give it a try.


 I am confused with the discussion in the this post:
 http://sourceware.org/ml/cygwin-xfree/2002-10/msg00071.html.  Those
 guys specifically tell to have DISPLAY defined before an ssh login.

If you read that post more carefully you will see your mistake.
You need to set DISPLAY on the computer you're X11 Server is runninng before 
you use ssh to login to your Windows Computer. That is to let ssh know which 
connection to forward. 'Inside' the ssh connection the forwarding mechanism 
will set DISPLAY. If you change it, it will be wrong. 


 Naively, I am assuming that each machine should have a DISPLAY set,
 for the simple reason that when I am physically at that machine, I
 need display in order to open x-windows.

That will not work.
If you change the role of the computers you can not fix DISPLAY in 
.bash_profile. That is not a good idea anyway, because you could have more than 
one X Server running.


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



Re: Fwd: ForwardX11 not working

2007-12-14 Thread xerces8
Maybe it will help, if you know what the DISPLAY variable is used for.

It is like this: when you start a program (like gnuplot),
it will okk at the DISPLAY variable and use its value as
the address of the X11 display to use.


So in your case, it will read localhost:0.0 and it will connect
and display on ... the localhost (localhost means the same PC).


Never set DISPLAY manually. That is the golden rule ;-)

OK, _almost_ never.

Regards,
David



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



Re: Fwd: ForwardX11 not working

2007-12-13 Thread Larry Hall (Cygwin X)

Mirko Vukovic wrote:

Hi,

I have cygwin installed as a server on my desktop.  I can log into it
from my linux box using ssh, but I cannot open displays on the linux
box.

By that I mean that if I login in using ssh, and invoke a command that
should open a window (like gnuplot), it opens the plot on the server,
and not on the client.

Here is my setup (the cygwin distribution is a few days old).

On the desktop (server),

 - I have ran ssh-host-config and set CYGWIN=ntsec server.  I said yes
to privilege separation, and I have an sshd user in /etc/passwd
 - I have set DISPLAY=localhost:0.0 in .bash_profile

^^
Don't do this.


On my linux box (client), I have an ~/.ssh/config file with the lines
in the section refering to the server: ForwardX11 yes and
ForwardX11Trusted yes

I can login to the server from both the linux box and my laptop (where
I also have cygwin), and can run unison (which requires ssh).

I read the various doc's and searched mails (does not mean I
understood everything), which resulted in the above setup.  I am
including the output of cygcheck.

Any suggestions as to what I may have missed, or what server/client
setting I can look at?


See above.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 429-6305 - FAX
Holliston, MA 01746

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