Operating System - Linux
1752689 Members
5369 Online
108789 Solutions
New Discussion юеВ

problem running remote x applications

 
Andrew Kaplan
Super Advisor

problem running remote x applications

Hi there --

We have a Fedora Core 5 system with an ATI Radeon X300 video card. The problem that is occurring is the inability of the system to run any remote X applications. I have updated the video driver to the latest version, and have ensured there are no firewalls running on either the local or remote systems.

The command syntax that is normally used is the following:

LOCALHOST:
xhost +
ssh -X -l

REMOTE HOST:
export DISPLAY=:0

When I try to run an x application, ie: xclock, the following error message appears:

unable to connect to display

Does anyone have any suggestions on how to proceed? Thanks.
A Journey In The Quest Of Knowledge
2 REPLIES 2
Ivan Ferreira
Honored Contributor

Re: problem running remote x applications

After using ssh -X, no xhost or export DISPLAY should be needed.

So, just run ssh -X and run your X application.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matti_Kurkela
Honored Contributor

Re: problem running remote x applications

Try omitting both "xhost +" and "export DISPLAY=..." from your procedure. What happens then?

When you use "ssh -X", the DISPLAY variable at the remote host should be automatically set to a value like :10.0. The display number may be greater than 10, if there are multiple simultaneous SSH connections with X forwarding.

This makes no sense according to all old-school X Window System knowledge, but it actually works: the sshd on the remote host is setting up a X proxy server on the remote host, with a display number of 10 or above. It even sets up xauth cookies for you, so there is no need to use "xhost +".

The ssh client on your local host then feeds the incoming X protocol requests to your local X server using an Unix domain socket (the same one used by local X applications).

If you modify the DISPLAY variable to point to your local system directly, you are bypassing the encrypted connection provided by SSH, and your X connection goes unprotected over the network.

To prevent this common mistake, most modern Linux distributions start their X server with a "-nolisten TCP" option. This makes the X server on your local host incapable of receiving any requests from remote X applications, unless the requests come through SSH-forwarded connections.

Nothing prevents you from removing the "-nolisten TCP" option from the X server startup settings, but novice users usually don't have a clue where it is set. If you know how to do that, you are presumably knowledgeable enough to understand whether or not it is really necessary. In most cases, it isn't.

MK
MK