I can login to a Remote Server, but graphical commands fail. They usually complain about the $DISPLAY environment variable. What is wrong?
It is possible to start a graphical command on the Remote Server and have the results displayed on your desktop, provided that the desktop can process X-Windows commands. But you must explicitly enable this functionality.
When invoking SSH from the commandline, you can explicitly request X-Windows forwarding with an extra option
ssh -X remote.server
This instructs SSH to forward the ability to view graphical applications on your desktop.
If you always want to enable X-Windows forwarding, you can configure an option in an SSH configuration file, namely
ForwardX11 yes
The default value for this option is no.
This option can be set by individual users in their configuration file
~/.ssh/config
Alternatively, the system administrator can set it centrally in
/etc/ssh/ssh_config
In case of conflict between the two files, the user's settings win.
It is not always safe to allow X11 display access to Remote Servers. If you wish to include only trusted hosts in this capability, you can setup the client-side configuration on a per-host basis, where the hostname on the commandline is matched:
Host *.orvelte.nep
ForwardX11 yes
Please note that the Remote Server must also allow X11 connections being relayed back over SSH connections. If the above still does not make it work for you, make sure that the following option is present:
X11Forwarding yes
This option can be found in the file
/etc/ssh/sshd_config
Note that X-Windows is a system distinct from MS Windows and Mac OS X, but that applications exist for these platforms to display X-Windows applications. Such an application ships by default with Mac OS X 10.3 and beyond; it can be downloaded from the Apple website for earlier versions. For Windows, a variety of providers exist.
Posted on Fri, 12 Mar 2004, 00:00.