From 241f3ed566d34bf5b6c67ebebcc00727134d93b2 Mon Sep 17 00:00:00 2001 From: runge Date: Mon, 12 Feb 2007 23:44:39 +0000 Subject: x11vnc: add avahi (aka mDNS/Zeroconf/Bonjour...) support thanks to Diego Petteno. add -find -create --- x11vnc/user.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'x11vnc/user.c') diff --git a/x11vnc/user.c b/x11vnc/user.c index 7124092..0322f85 100644 --- a/x11vnc/user.c +++ b/x11vnc/user.c @@ -1382,6 +1382,28 @@ int wait_for_client(int *argc, char** argv, int http) { keep_unixpw = 1; } + if (!inetd) { + if (!use_openssl) { + announce(screen->port, use_openssl, NULL); + fprintf(stdout, "PORT=%d\n", screen->port); + } else { + fprintf(stdout, "PORT=%d\n", screen->port); + if (stunnel_port) { + fprintf(stdout, "SSLPORT=%d\n", stunnel_port); + } else if (use_openssl) { + fprintf(stdout, "SSLPORT=%d\n", screen->port); + } + } + fflush(stdout); + } else if (!use_openssl && avahi) { + char *name = rfb_desktop_name; + if (!name) { + name = use_dpy; + } + avahi_initialise(); + avahi_advertise(name, this_host(), screen->port); + } + if (inetd && use_openssl) { accept_openssl(OPENSSL_INETD); } -- cgit v1.2.3