Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two *nix machines that I like to remotely do graphical things sometimes with. One of those machines is my Arch Linux media server, and another is my OpenBSD router/general server.

My current task was installing a Windows XP over virtual box on my media server. I preferred to do the installation from my main workstation so that I could continue to watch TV from my media server on it's "actual" display.

I soon noticed that X forwarding is quite painful though, even over low-latency LAN connections. Are there any settings I can tweak to make it a bit less painfully slow, jittery, and laggy? My LAN is rather small, 100Mbit, and ping times to the other box average at about 0.15ms.

Also, I know Virtualbox has a VNC mode it can use instead of doing X forwarding, but this particular task was just an example

share|improve this question

Use Xfce.

In conjunction with the Best SSH options for X11 forwarding (provided by this Super User answer), I was able to achieve surprisingly good performance (and bearable!), even from Mozilla Firefox.

Test Conditions

Two host machines were used for comparison:

  • an Intel Core i7 720QM @ 1.60 GHz machine running KDE 4.8.4
  • an Intel Pentium 4 @ 2.80 GHz machine running Xfce 4.8

I did have a machine running GNOME 2.32 that I did X forwarding testing over LAN with, but the procedures were not intended for answering this question.

An iMac 11,2 27" was tasked with running the entire desktop workspace (plasma-desktop and startxfce4) over Mac OS X.

All machines were connected with a high-latency connection averaging about 15 ms.

Test Results

  • GNOME 2.32 was painful to use, like how you were complaining. This is the baseline.
  • KDE 4.8.4 was even more painful to use. I could hardly get anything done because the performance was so bad. Plasma Desktop took too long to respond to be practical. Dolphin was sluggish and exponentially so the more I tried interacting with it.
  • Xfce 4.8 was actually snappy. After things loaded, performance was almost like I was directly using the machine. Thunar was highly responsive, which I didn't expect after trying out GNOME and KDE.

Test Analysis and Recommendations

The GNOME and KDE desktops had a lot of hardware advantages over the Xfce desktop. Since the weaker Xfce desktop far outperformed the much stronger GNOME and KDE desktops for X tunneling over SSH through LAN, the results are even more astounding.

You've also got a faster LAN latency than I, so it can be expected that your experience with Xfce may be even better than mine.

The cause for such a radical difference must be due to Xfce's lightweight design.

If you're looking for better performance for X forwarding via SSH, use Xfce.

share|improve this answer

Change the cipher usually brings some improvements. You can check it here.

Enable or disable the compression -C can also bring some improvements. If you should enable or disable it depends on your machines and on your lan. Usually you should enable it (check here), but you should make tests to check what is the best compression level for you.

For last you can also try NX. Some people claim it's faster than direct X Forwarding. But I've never tried it so I can't verify this.

share|improve this answer

Try using vncserver and vncviewer (not related to virtualbox). This setup improved my screen update latency from 10 seconds to less than half a second while running the "squirrel" application over a DSL connection.

share|improve this answer
vnc isn't much better over LAN, but it is much more usable than X over a WAN connection(such as DSL) – Earlz Jul 3 '12 at 8:45
Just curious if you tried running both vncserver and vncviewer on the media server with the X11 forwarding (from vncviewer to you main workstation) via ssh with compression and blowfish cipher mentioned by @criziot? – Brian Swift Jul 3 '12 at 9:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .