summaryrefslogtreecommitdiffstats
path: root/x11vnc/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/util.c')
-rw-r--r--x11vnc/util.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/x11vnc/util.c b/x11vnc/util.c
index 9c8c294..80b1607 100644
--- a/x11vnc/util.c
+++ b/x11vnc/util.c
@@ -594,6 +594,9 @@ int rfbPE(long usec) {
if (ipv6_listen) {
check_ipv6_listen(usec);
}
+ if (unix_sock) {
+ check_unix_sock(usec);
+ }
if (check_rate != 0) {
if (check_rate < 0) {
if (getenv("CHECK_RATE")) {
@@ -713,9 +716,31 @@ char *choose_title(char *display) {
if (display == NULL) {
display = getenv("DISPLAY");
}
+
+#ifdef MACOSX
+ if (display == NULL || strstr(display, "/tmp/") == display) {
+ char *u = get_user_name();
+ char *th = this_host();
+ if (strlen(u) > MAXN/4) {
+ u = "someone";
+ }
+ strcpy(title, u);
+ if (th == NULL && UT.nodename) {
+ th = UT.nodename;
+ }
+ if (th) {
+ strcat(title, "@");
+ strncat(title, th, MAXN - strlen(title));
+ }
+ return title;
+ }
+#endif
+
if (display == NULL) {
return title;
}
+
+ /* use display: */
title[0] = '\0';
if (display[0] == ':') {
char *th = this_host();