0

This may seem like a strange question but it has some value for the project I am currently working on.

I have a Windows 2003 server running XMing (or Cygwinx). I am connecting to the server from Ubunutu using ssh with X11 forwarding enabled. When I launch any X application on the Windows 2003 server (such as xeyes) the application displays on the Windows server and not on the local Ubuntu machine.

Xming is a fully implemented X Server so I assumed it would support serving X applications to remote clients. Any suggestions why this is not working?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Richard Dorman
  • 23,170
  • 16
  • 45
  • 49
  • X11 servers display stuff on the local hardware, you don't need an X server on windows to display them on your linux machine, you want X11 programs on windows to use the X11 server on your linux box rather. Also, this is not a programming question. – nos Aug 07 '09 at 16:28

2 Answers2

1

Sounds like the ssh server is not acknowledging the X forwarding request. After you login, check the environment and you should see the DISPLAY variable set, indicating host and display (e.g. localhost:10); if that is missing, the X clients will use the default (e.g localhost:0) DISPLAY.

Also, the X server on the remote machine (the one ssh'd into) has no bearing on this, only the X clients installed there. When you ssh to the remote machine, your local Ubuntu host is the X server, accepting connections from the remote X clients.

libjack
  • 6,403
  • 2
  • 28
  • 36
  • When I first connect via SSH my display variable is not set. I have manually set it to DISPLAY=127.0.0.1:0.0. This still results in the x application displaying on the remote desktop. – Richard Dorman Aug 07 '09 at 15:30
  • There are configuration options for sshd for enabling/configuring X11 Forwarding. On my linux server, for example, the file /etc/ssh/sshd_config contains "X11Forwarding yes"; not sure where this config would be for the Windows server – libjack Aug 07 '09 at 15:55
  • Finally managed to work this one out. The problem was with the access control setting. The simple solution (although not a secure one) is to turn off access control on the X Server. So 'xming -ac -multiwindow' to start the X server on the client machine, then 'ssh -X userAip' to the host machine and finally 'export DISPLAY=clientip:0.0' once the connection is made. – Richard Dorman Aug 12 '09 at 13:20
  • Looks like there is one more configuration setting that may be necessary for running remote X apps. Run gdmsetup on the Ubuntu box and uncheck 'Deny TCP connections to Xserver'. By default this is checked. – Richard Dorman Aug 14 '09 at 08:48
  • Ah, that's a big one, that would always get in the way... thanks for finding that. – libjack Aug 14 '09 at 14:54
0

What is happening is the correct behaviour. The X Server (XMing) is running on Windows 2003 and serving the Xeyes application (a client) to you.

From Wikipedia with some edits ...

The X server accepts requests for graphical output (your W2003 server's display) and sends back user input (from your keyboard, mouse, or touchscreen).

X Window System's client-server terminology — the user's terminal being the server and the applications being the clients — often confuses new users, because the terms appear reversed. But X takes the perspective of the application, rather than that of the end-user: X provides display and I/O services to applications, so it is a server; applications use these services, thus they are clients.

fpmurphy
  • 2,464
  • 1
  • 18
  • 22
  • 1
    I don't agree that this is the correct behaviour. Xeyes is being launched from the Ubuntu ssh session (connected to the Windows 2003 server) so it should display on the Ubuntu desktop not on the Windows desktop. If I reverse this situation (connect from the Windows server to the Ubuntu box) I get the correct behaviour, that is, Xeyes is launched in a Windows ssh session and displays in Windows. – Richard Dorman Aug 07 '09 at 15:24