1 Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
2 ===================================================================
3 --- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:51.000000000 +0100
4 +++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:27:04.000000000 +0100
9 + String usernameParam;
12 boolean showOfflineDesktop;
15 case RfbProto.SecTypePlain:
16 showConnectionStatus("Plain authentication");
18 - String user = askUser();
19 - String pw = askPassword();
20 - rfb.authenticatePlain(user,pw);
21 + if (usernameParam != null && passwordParam != null) {
22 + rfb.authenticatePlain(usernameParam, passwordParam);
24 + String user = askUser();
25 + String pw = askPassword();
26 + rfb.authenticatePlain(user,pw);
29 case RfbProto.SecTypeTLSNone:
31 // Read "ENCPASSWORD" or "PASSWORD" parameter if specified.
32 readPasswordParameters();
34 + usernameParam = readParameter("USERNAME", false);
38 str = readParameter("Open New Window", false);