swing - Java application kills remote Xvnc server -
i'll start off saying i'm relatively new java ui development. machines involved running rhel6. java openjdk 1.7. have application (please excuse typos; had hand-copy internetless environment):
import javax.swing.*; import java.awt.*; class testapp{ public static void main(string[] args){ swingutilities.invokelater(new runnable(){ @override public void run(){ graphicsenvironment e = graphicsenvironment.getlocalgraphicsenvironment(); font[] fonts = e.getallfonts(); (font font: fonts){ system.out.println(font.getfontname()); } jtextarea text_pane = new jtextarea(); system.out.println("using " + text_pane.getfont().getfontname()); text_pane.settext("hi"); jframe j = new jframe(); j.add(text_pane); j.setsize(new dimension(100,100)); j.setvisible(true); } }); } }
as can see, print available font families, print default font family, , display little window bit of text. when run locally, works fine. have remote machine running turbovnc(turbo1.1) on display :99, started command
./xvnc :99 -geometery 1000x1000 -ac
if scp app remote machine, export display=:99.0, , run it, works fine. however, if try run application locally display exported remotehost:99.0, remote xvnc server crashes double free or corruption. in backtrace see addglyph call. limited experience x leads me believe font problem, i.e. locally-running app trying use font not available on remote machine. the
system.out.println("using " + text_pane.getfont().getfontname());
call print out same font name (dialog.plain) when run on either machine, i'm not sure if means anything. there way around problem? coming @ wrong angle entirely? should note xeyes , xterm run fine when exported local machine remote display, it's java app kills it.
if stumbles onto this: problem version of java new enough enables xrender default, xvnc version on remote server old , doesn't support it. launching application with
-dsun.java2d.xrender=false
fixed issue.
Comments
Post a Comment