Running Java programs over SSH/X

Sometimes you need to run Java GUI programs over an SSH tunnel. However, this can be excruciatingly slow, because X's and Java's understanding of how to draw stuff just doesn't seem to be very compatible.

Here's what I do to make it tolerable, if not pleasant.

First, use a fast cipher like blowfish with SSH (assuming these aren't your default options):

   ssh -C -c blowfish

Second, when starting the java app, use something like this (invocation may be slightly different depending on your environment):

   export JAVA_OPTS="-Dsun.java2d.pmoffscreen=false ${JAVA_OPTS}"

This turns off the offscreen pixmap support as detailed in JDK6 documentation, and makes for a significantly faster experience.


No comments yet.
More info...     Comments?   Back to weblog
"Main_blogentry_120213_1" last changed on 12-Feb-2013 23:24:13 EET by JanneJalkanen.