Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
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. –  Arthur Ulfeldt Nov 4 '09 at 1:56

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.