From: Emil Tomczyk <emil.tomczyk@skni.umcs.pl>
To: 9front@9front.org
Subject: [9front] vncv patch
Date: Mon, 15 Aug 2022 22:24:43 +0200 [thread overview]
Message-ID: <20220815202443.rungs4ub4ah7neyv@melkor.home> (raw)
In-Reply-To: <3496E2C20C950B6CFA9424F09804A810@9front.inri.net>
[-- 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();
next parent reply other threads:[~2022-08-15 20:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3496E2C20C950B6CFA9424F09804A810@9front.inri.net>
2022-08-15 20:24 ` Emil Tomczyk [this message]
2022-08-15 21:15 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220815202443.rungs4ub4ah7neyv@melkor.home \
--to=emil.tomczyk@skni.umcs.pl \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).