|
Article ID: 256
Last updated: 25 Mar, 2026
To run X applications (such as xclock, emacs, totalview, etc) on the X client host (for example, a NAS system such as pfe25, etc.) and display them back to an X server (such as your local system), the simplest way is to use SSH X11 Forwarding. If you are using a NAS-supported workstation or compute server, X11 Forwarding is already set up for you. The following command activates SSH X11 Forwarding automatically:
Most modern SSH client software support this option (for example, Cygwin, TeraTerm, PuTTY, Unix, and Linux). To use SSH X11 Forwarding, the SSH server-side daemon (sshd) configuration file must contain the entry:
to support the forwarding capability. All NAS-supported hosts (including all workstations and compute servers) honor this setting in the default sshd_config file (for High End Computing systems and Linux systems, it is /etc/ssh/sshd_config; for Mac systems, it is /etc/sshd_config) For other non-NAS machines, ask your system administration to set this in the sshd_config file. In addition to setting X11Forwarding yes on the SSH server side (for example, a NAS machine), it is recommended that ForwardX11 yes is also set in the ssh_config file on the SSH client host (for example, your local system). By default, NAS and HEC system configurations will enable these settings for both client and server. If ForwardX11 yes is not set in the ssh_config file by the system administrator of your local system, you can set it in your ~/.ssh/config file or use the -X option of SSH. Other parameters related to the performance of X11 Forwarding are handled by the NAS-recommended ssh_config file. If you are on a NAS-supported system, no action is needed in setting these parameters yourself. If your local system is not supported by NAS and you would like to get configuration ideas, you can look at /etc/ssh/ssh_config on any NAS high-end computing system, such as pfe[20-22,25,26]. ExampleTo run an X11-based application, for example, xclock, on pfe25.nas.nasa.gov and have it displayed on your local system, do the following:
To run an X11-based application on a NAS-supported desktop, follow the example below:
If ForwardX11 yes is not set in either the ssh_config file or the ~/.ssh/config file of your local system, use:
WARNING: The SSH daemon sets the DISPLAY environment variable by itself. DO NOT RESET it to point to display zero (for example, setenv DISPLAY your_local_system:0), otherwise SSH X11 Forwarding will not work.
WARNING: For each new login, the .Xauthority file gets updated. If you are over your quota, this file cannot be updated and you get the error:
/usr/X11R6/bin/xauth: error in locking authority file /u/username/.XauthorityX11 Forwarding will not work if you receive this error. |