4

I'm using ssh -X to run a program (intellij) on a virtual machiene on my laptop (ubuntu on ubuntu) and its just a little too lagy. I could like to do something to reduce the overhead of ssh (perhaps use something else?)
vnc is no better and doesn't play nicely with the clipboard etc.

2 Answers 2

4

If security isn't a requirement, like in your case of running virtualized OS. You can open the X11 windows directly to your non-VM Ubuntu screen. This should in theory give you the best possible speed and lowest latency, though in some cases I've noticed that VNC does better job. The only drawback is that without some extra helper apps, you cannot close the connection the app and reconnect later.

Lets assume that your VM Ubuntu has IP address of 10.0.0.2 and the "real" Ubuntu has virtual interface IP 10.0.0.1 and is the GW for the virtual machine (this would be something you would have with NAT mode. With bridge-mode, both OS have IP given either some external DHCP server, or they are set manually).

On your non-VM Ubuntu you need to use xhost command to allow incoming X11 connection from the VM, to do this write on terminal application:

xhost +10.0.0.2

Then connect to the virtual machine with ssh or with the virtual machine terminal and open up a terminal application and write:

export DISPLAY=10.0.0.1:0.0

then when you run an application from that terminal window, it opens its windows directly on your non-VM Ubuntu.

1
  • 2
    it seems that Ubuntu disables X11 TCP connections by default. you can 'fix this' by editing /etc/X11/gdm/gdm.conf. This is something of a security hole so you would then need to firewall off tport 6000 from all but the host thats to be allowed. Nov 4, 2009 at 1:56
3

You can request ssh compression using -C:

ssh -X -C myhost

-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 protocol 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.

Alternatively you might want to try FreeNX, which is faster than VNC

You must log in to answer this question.

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