aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps.c2
-rw-r--r--vnc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps.c b/apps.c
index 916b3c9..2bf7de0 100644
--- a/apps.c
+++ b/apps.c
@@ -248,7 +248,7 @@ int open_vnc_session(char *host, int tcpport)
char javaurl[64];
char vncurl[64];
- snprintf(display, sizeof(display), "%s:%d", host, tcpport - 5900);
+ snprintf(display, sizeof(display), "%s::%d", host, tcpport);
snprintf(javaurl, sizeof(javaurl), "http://%s:%d/", host, tcpport - 100);
snprintf(vncurl, sizeof(vncurl), "vnc://%s:%d/", host, tcpport);
diff --git a/vnc.c b/vnc.c
index 8da4fc9..fa62096 100644
--- a/vnc.c
+++ b/vnc.c
@@ -500,8 +500,8 @@ GtkWidget *vnc_open(char *hostname, int tcpport, unsigned long flags,
goto err;
/* rfb client */
- snprintf(display, sizeof(display), "%s:%d", hostname, tcpport - 5900);
- fprintf(stderr, "%s: connecting to %s:%d\n", __FUNCTION__, hostname, tcpport - 5900);
+ snprintf(display, sizeof(display), "%s::%d", hostname, tcpport);
+ fprintf(stderr, "%s: connecting to %s\n", __FUNCTION__, display);
if (8 == x11_red_bits)
vnc->client = rfbGetClient(8,3,4);
else