[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
Hey,
I wrote a small patch for vncv. This patch allows to specify port on the
remote vnc server. Also I've added/removed some tabs when they were
inconsistent and added -t (TLS) option to usage(). Although TLS
connection wasn't working for me.
Emru
[-- Attachment #2.1: Type: text/plain, Size: 297 bytes --]
from postmaster@9front:
The following attachment had content that we can't
prove to be harmless. To avoid possible automatic
execution, we changed the content headers.
The original header was:
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="vncv.c.patch"
[-- Attachment #2.2: vncv.c.patch.suspect --]
[-- Type: application/octet-stream, Size: 1360 bytes --]
diff f84cf1e60427675514fb056cc1723e45da01e043 uncommitted
--- a/sys/src/cmd/vnc/vncv.c
+++ b/sys/src/cmd/vnc/vncv.c
@@ -2,14 +2,15 @@
#include "vncv.h"
#include <libsec.h>
-char* charset = "utf-8";
-char* encodings = "copyrect hextile corre rre raw mousewarp desktopsize xdesktopsize";
+char* charset = "utf-8";
+char* encodings = "copyrect hextile corre rre raw mousewarp desktopsize xdesktopsize";
int bpp12;
int shared;
int verbose;
-Vnc* vnc;
+Vnc* vnc;
int mousefd;
int tls;
+int port = 0;
static int vncstart(Vnc*, int);
@@ -46,15 +47,17 @@
netmkvncaddr(char *server)
{
char *p, portstr[NETPATHLEN];
- int port;
/* leave execnet dial strings alone */
if(strncmp(server, "exec!", 5) == 0)
return server;
- port = 5900;
- if(tls)
- port = 35729;
+ if(!port)
+ if(tls)
+ port = 35729;
+ else
+ port = 5900;
+
if((p = strchr(server, ']')) == nil)
p = server;
if((p = strchr(p, ':')) != nil) {
@@ -74,7 +77,7 @@
void
usage(void)
{
- fprint(2, "usage: vncv [-e encodings] [-k keypattern] [-l charset] [-csv] host[:n]\n");
+ fprint(2, "usage: vncv [-e encodings] [-k keypattern] [-l charset] [-p port] [-cstv] host[:n]\n");
exits("usage");
}
@@ -107,6 +110,9 @@
break;
case 'l':
charset = EARGF(usage());
+ break;
+ case 'p':
+ port = atoi(EARGF(usage()));
break;
default:
usage();