Home » Questions » Computers [ Ask a new question ]

how to reduce ssh X forwarding overhead

how to reduce ssh X forwarding overhead

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

Asked by: Guest | Views: 229
Total answers/comments: 1
bert [Entry]

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