5
0
mirror of git://git.proxmox.com/git/vncterm.git synced 2025-01-05 17:17:38 +03:00
vncterm/newtigerpatches/add-username-param.patch
Dietmar Maurer 336e20e1c7 add patches for newer tigervnc 1.2.0
but the current 1.2.0 branch is not usable because it always
opens a new toplevel window.
2013-04-19 09:07:04 +02:00

51 lines
2.1 KiB
Diff

Index: new/java/com/tigervnc/vncviewer/CConn.java
===================================================================
--- new.orig/java/com/tigervnc/vncviewer/CConn.java 2013-04-18 11:56:21.000000000 +0200
+++ new/java/com/tigervnc/vncviewer/CConn.java 2013-04-18 14:23:58.000000000 +0200
@@ -246,6 +246,16 @@
String passwordFileStr = viewer.passwordFile.getValue();
PasswdDialog dlg;
+ String usernameParam = viewer.usernameParam.getValue();
+ String passwordParam = viewer.passwordParam.getValue();
+ vlog.info("USERNAME: " + usernameParam);
+ vlog.info("PASSWORD: " + passwordParam);
+ if (usernameParam != null && passwordParam != null) {
+ user.append(usernameParam);
+ passwd.append(passwordParam);
+ return true;
+ }
+
if (user == null && passwordFileStr != "") {
InputStream fp = null;
try {
Index: new/java/com/tigervnc/vncviewer/VncViewer.java
===================================================================
--- new.orig/java/com/tigervnc/vncviewer/VncViewer.java 2013-04-18 13:56:33.000000000 +0200
+++ new/java/com/tigervnc/vncviewer/VncViewer.java 2013-04-19 07:52:32.000000000 +0200
@@ -168,6 +168,9 @@
if (firstApplet) {
alwaysShowServerDialog.setParam(true);
Configuration.readAppletParams(this);
+
+ System.err.print(Configuration.listParams());
+
String tmpcert = this.getParameter("PVECert");
if (tmpcert != null) {
CSecurityTLS.PVECert.setParam(tmpcert.replace('|', '\n'));
@@ -263,6 +266,14 @@
"Password file for VNC authentication", "");
AliasParameter passwd
= new AliasParameter("passwd", "Alias for PasswordFile", passwordFile);
+
+ StringParameter usernameParam
+ = new StringParameter("USERNAME",
+ "Username for VNC authentication", null);
+ StringParameter passwordParam
+ = new StringParameter("PASSWORD",
+ "Password for VNC authentication", null);
+
BoolParameter autoSelect
= new BoolParameter("AutoSelect",
"Auto select pixel format and encoding", true);