By Louis Pelosi |

A few of the more common problems with connecting to a remote X11 window session via SSH:

X11 Forwarding

You may not have enabled X11 session forwarding in either your SSH configuration files, or directly in your SSH client application.  On the file system, this can be configured in either, or both, of two configuration files:

  • Your user configuration file:



  • The system-wide configuration file:

    /etc/ssh/ssh_config or /etc/ssh_config


In either file, the following directives should be set:

 ForwardX11 yes
 Compression yes

You can also use the -X option at the command line, as in:

ssh -X me@remotehost

Additional information



Trusted X11 Forwarding

You may have disabled trusted X11 forwarding, or not yet enabled this option, while using an application that requires it.  To enable trusted X11 forwarding, do one, or both, of the following:

  • Use the -Y command line option instead of -X, as in:

    ssh -Y me@remotehost


  • Add the following directive to your ssh_config file:

    ForwardX11Trusted yes



Space Quotas

You may have met or exceeded the allotted space quota on the SSH gateway, in your AFS/NFS home directory on the remote host, or both. This will deny the SSH daemon the ability to forward your X11 authentication information to the remote host and write it to the .Xauthority file in your home directory.

Check your quota level (via the quota command) and verify whether the limit has been met or exceeded.  If so, either delete any large, unnecessary files or request a quota increase.  Once the quota issue has been addressed, log off of the remote server and back in again.

.Xauthority file

The .Xauthority file in your home directory may have become corrupted or otherwise unwritable. To check this, try the command:

xauth -f ~/.Xauthority list

If necessary, delete this file (rm -f ~/.Xauthority), and log off of the remote server and back in again.

If the same problems persist, your home directory or partition may have run out of available disk space.

X11 and Mac OS X

Mac no longer includes X11 server and client libraries, which can instead be obtained and installed from the XQuartz project to provide this functionality.

If all else fails

If you continue to experience issues with X11 sessions after checking and exhausting these possibilities, please open a support ticket in the GCE queue.