aboutsummaryrefslogtreecommitdiffstats
path: root/apps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps.c')
-rw-r--r--apps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps.c b/apps.c
index fab3c4d..916b3c9 100644
--- a/apps.c
+++ b/apps.c
@@ -242,15 +242,15 @@ int run_cmdline_replace(int do_wait, char *str, ...)
/* ------------------------------------------------------------------ */
-int open_vnc_session(char *host, int screen)
+int open_vnc_session(char *host, int tcpport)
{
char display[64];
char javaurl[64];
char vncurl[64];
- snprintf(display, sizeof(display), "%s:%d", host, screen);
- snprintf(javaurl, sizeof(javaurl), "http://%s:%d/", host, 5800 + screen);
- snprintf(vncurl, sizeof(vncurl), "vnc://%s:%d/", host, 5900 + screen);
+ snprintf(display, sizeof(display), "%s:%d", host, tcpport - 5900);
+ snprintf(javaurl, sizeof(javaurl), "http://%s:%d/", host, tcpport - 100);
+ snprintf(vncurl, sizeof(vncurl), "vnc://%s:%d/", host, tcpport);
/* --- try client apps --- */
if (have_application("vncviewer"))