SSH compression for X11 forwarding

Im on the east coast of the United States, sshing into a server on the west coast.

I managed to run the X11 forwarding so that I could run graphical applications for certain tasks where it is useful. However, for all X11 redirected applications (especially emacs !), There are too many delays between inputs (keystrokes, mouse clicks, etc.) and the answer, which sometimes comes from incredible frustration, is potentially dangerous - when I intend to do A but B happens because the lag is so great.

Is SSH compression a potential culprit? What compression should I use?

+7
source share
2 answers

X11 graphics takes up a lot of bandwidth. If your remote host is at some distance (i.e. Not on the local network), then you are likely to experience instability in your exported X11 applications.

I am not sure about SSH compression. Performance may depend on other factors, such as processor performance. On the ssh man page:

  -C Requests compression of all data (including stdin, stdout,
              stderr, and data for forwarded X11 and TCP connections).  The
              compression algorithm is the same used by gzip (1), and the
              "level" can be controlled by the CompressionLevel option for pro‐
              tocol version 1. Compression is desirable on modem lines and 
               other slow connections, but will only slow down things on fast 
               networks.  The default value can be set on a host-by-host basis
              in the configuration files;  see the Compression option.

Here are some other workarounds you can use to speed things up:

  • Instead of interacting with the GUI using X11 forwarding, consider something else that has better optimization / compression, like VNC or NX / FreeNX.
  • Use the terminal version of emacs instead of the GUI version.
+14
source

As you mentioned emacs : there is a command line option

  -nw, --no-window-system Tell Emacs not to create a graphical frame. If you use this switch when invoking Emacs from an xterm(1) window, display is done in that window. 

This can be much faster when working on ssh (since it should only transmit a character, and not redraw the entire screen in X11).

+1
source

All Articles