Re: How to run _X_ Session from RH8 via ssh -X?

2006-03-18 Thread Brett Serkez
 But now I just realized the obvious: Only X GUIS work and not windows.

 Is this correct?

Yes!

 I assume I can tunnel rdesktop the same way I tunnel vnc? I guess I'll try
 tunneling both vnc and rdesktop  next.

I've heard this works, but have not tried personally.  If you get this
working, can you post your ssh command with the port(s) you needed to
forward?

Brett

--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-18 Thread Larry Hall (Cygwin X)

Brett Serkez wrote:

But now I just realized the obvious: Only X GUIS work and not windows.

Is this correct?


Yes!


I assume I can tunnel rdesktop the same way I tunnel vnc? I guess I'll try
tunneling both vnc and rdesktop  next.


I've heard this works, but have not tried personally.  If you get this
working, can you post your ssh command with the port(s) you needed to
forward?


I used to use the following all the time to access my Windows machine
remotely:

ssh -f -L 5901:localhost:5900 -N -C -o Compression=yes -o CompressionLevel=9 
machine name or ip

vncviewer 

YMMV.

Obviously, you need to make sure that the port ssh is using is open
through any firewall.

None of this is really Cygwin-specific so further discussion on this l
list along this line is really off-topic though.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - 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/



Re: How to run _X_ Session from RH8 via ssh -X? How to run vnc via ssh?

2006-03-17 Thread René Berber
Siegfried Heintze wrote:
[snip]
  (2) For reasons I don't understand, there was a conflict between my router's
  sshd and my cygwin's sshd so I resolved the problem by changing the cygwin's
  configuration file to start sshd on a different port. Now, using a Red Hat 8
  client, I can use both rdesktop and ssh to create two different simultaneous
  sessions on my win2003 server.
 
  However, I cannot seem to start an X session from my ssh  -X -p 892
  [EMAIL PROTECTED] session. I tried running explorer . and that
  just hung. OK, that was not an X program.  Then I tried
  /usr/X11R6/bin/xclock and it said it could not open the display. Having
  already done a xhost+ remote wan address before running ssh I tried export
  DISPLAY=client lan address:0.0 but that did not help: it still could not
  open the display.

If you are using ssh -X or -Y you don't need to set DISPLAY, in fact ssh already
did set it.  But if you set DISPLAY then X uses the normal ports and those will
have to be opened/redirected on the firewall.

  Do I need to punch a whole in my client's firewall? I doubt the will let me
  do that.

Not if you only use ssh.  But take in consideration that you changed ssh to use
port 892, that one is the one that will have to be opened.

  Don't I need to start the xserver?

In the remote system? no.

[snip]
  winCheckDisplayNumber - Cygwin/X is already running on display 0

It was running already but it's not needed unless you want to use VNC.

  (3) What about vnc? I have installed RealVNC on both the RH8 client and the
  Windows 2003 server.

For VNC you'll need to open port 5901 (or 5801 for http); this is only for the
first window, it really is 5900 + display number, in case you have more than one
user connecting to the same machine.

  Is there also a cygwin VNC? I don't remember seeing one.

No.

  Can I make vnc tunnel thru ssh? Would I use the -L or the -R qualifier
  on ssh? What would that look like?

Yes.  You have to start the VNC server and then (assuming display 1 is used):

client machine# ssh -NfC -L 5901:server.name.or.ip:15901 [EMAIL PROTECTED]

server machine# ssh -gN -L 15901:localhost:5901 [EMAIL PROTECTED]

The numbers may have to be changed (as I said above) depending on what starting
the server reported as display number or how is setup to start if you start it
from the X server.

On the client you use as VNC server localhost:1.

HTH
-- 
René Berber


--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread Siegfried Heintze
[snip]

   However, I cannot seem to start an X session from my ssh  -X -p 892
   [EMAIL PROTECTED] session. I tried running explorer . and
that
   just hung. OK, that was not an X program.  Then I tried
   /usr/X11R6/bin/xclock and it said it could not open the display.
Having
   already done a xhost+ remote wan address before running ssh I tried
export
   DISPLAY=client lan address:0.0 but that did not help: it still could
not
   open the display.
 
 If you are using ssh -X or -Y you don't need to set DISPLAY, in fact ssh
already
 did set it.  But if you set DISPLAY then X uses the normal ports and those
will
 have to be opened/redirected on the firewall.
 
 [snip]
   winCheckDisplayNumber - Cygwin/X is already running on display 0
 
 It was running already but it's not needed unless you want to use VNC.

Well what am I doing wrong? I forgot to mention: the firewall guarding the
windows machine must have the necessary ports open or I would not be able to
establish a console window on it.

Why does  /usr/X11R6/bin/xclock still say Error can't open display:?

Thanks,
Siegfried


--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread René Berber
Siegfried Heintze wrote:
 [snip]
 Why does  /usr/X11R6/bin/xclock still say Error can't open display:?

That looks like an explicit unsetting of DISPLAY, i.e. somewhere, probably your
.profile/.bashrc/.bash_profile, has a unset DISPLAY.

Starting in Cygwin:
$ echo $DISPLAY
:0
$ ssh -X [EMAIL PROTECTED]
# echo $DISPLAY
localhost:10.0

Notice that ssh created a pseudo display that will be used to tunnel the X
protocol back to your local X server.
-- 
René Berber


--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread Siegfried Heintze
  [snip]
  Why does  /usr/X11R6/bin/xclock still say Error can't open display:?
 
 That looks like an explicit unsetting of DISPLAY, i.e. somewhere, probably
your
 .profile/.bashrc/.bash_profile, has a unset DISPLAY.
 
 Starting in Cygwin:
 $ echo $DISPLAY
 :0
 $ ssh -X [EMAIL PROTECTED]
 # echo $DISPLAY
 localhost:10.0
 
 Notice that ssh created a pseudo display that will be used to tunnel the X
 protocol back to your local X server.

I did 
ssh -X [EMAIL PROTECTED]
ls -A -1 | xargs grep -n DISPLAY *
echo $DISPLAY

The only place DISPLAY occurred (in the output) was in the .bash_history
file. Echo $DISPLAY gave a blank line only.

Any other suggestions?
Sieg 


--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread René Berber
Siegfried Heintze wrote:
 [snip]
 echo $DISPLAY

 Any other suggestions?

Check /etc/sshd_config on the server, configure it to forward X11:

# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

After restarting sshd try:

ssh -X [EMAIL PROTECTED] 'echo $DISPLAY'
-- 
René Berber


--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread Doug VanLeuven

Siegfried Heintze wrote:

[snip]
Why does  /usr/X11R6/bin/xclock still say Error can't open display:?

That looks like an explicit unsetting of DISPLAY, i.e. somewhere, probably

your

.profile/.bashrc/.bash_profile, has a unset DISPLAY.

Starting in Cygwin:
$ echo $DISPLAY
:0
$ ssh -X [EMAIL PROTECTED]
# echo $DISPLAY
localhost:10.0

Notice that ssh created a pseudo display that will be used to tunnel the X
protocol back to your local X server.


I did 
ssh -X [EMAIL PROTECTED]

ls -A -1 | xargs grep -n DISPLAY *
echo $DISPLAY

The only place DISPLAY occurred (in the output) was in the .bash_history
file. Echo $DISPLAY gave a blank line only.

Any other suggestions?



On linux system:
/etc/ssh/sshd_config
X11Forwarding yes
/etc/ssh/ssh_config
ForwardX11 yes

On cygwin system:
/etc/defaults/etc/sshd_config
X11Forwarding yes
/etc/defaults/etc/ssh_config
ForwardX11 yes

Doug

--
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: How to run _X_ Session from RH8 via ssh -X?

2006-03-17 Thread Siegfried Heintze
Thanks Dan and Rene! It works.

But now I just realized the obvious: Only X GUIS work and not windows. 

Is this correct?

I assume I can tunnel rdesktop the same way I tunnel vnc? I guess I'll try
tunneling both vnc and rdesktop  next.

Siegfried


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