build: use temp file for glyph.h
[vncterm.git] / tigerpatches / username-param.patch
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
5 @@ -86,6 +86,7 @@
6    String host;
7    int port;
8    String passwordParam;
9 +  String usernameParam;
10    boolean showControls;
11    boolean offerRelogin;
12    boolean showOfflineDesktop;
13 @@ -384,10 +385,12 @@
14             break;
15         case RfbProto.SecTypePlain:
16             showConnectionStatus("Plain authentication");
17 -           {
18 -               String user = askUser();
19 -               String pw = askPassword();
20 -               rfb.authenticatePlain(user,pw);
21 +           if (usernameParam != null && passwordParam != null) {
22 +             rfb.authenticatePlain(usernameParam, passwordParam);
23 +           } else {
24 +             String user = askUser();
25 +             String pw = askPassword();
26 +             rfb.authenticatePlain(user,pw);
27             }
28             break;
29         case RfbProto.SecTypeTLSNone:
30 @@ -822,6 +825,8 @@
31      // Read "ENCPASSWORD" or "PASSWORD" parameter if specified.
32      readPasswordParameters();
33  
34 +    usernameParam = readParameter("USERNAME", false);
35 +
36      String str;
37      if (inAnApplet) {
38        str = readParameter("Open New Window", false);