summaryrefslogtreecommitdiffstats
path: root/x11vnc/ssltools.h
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/ssltools.h')
-rw-r--r--x11vnc/ssltools.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/x11vnc/ssltools.h b/x11vnc/ssltools.h
index 6635bdf..a454772 100644
--- a/x11vnc/ssltools.h
+++ b/x11vnc/ssltools.h
@@ -802,6 +802,9 @@ char find_display[] =
" showxauth=\"\"\n"
" shift\n"
"fi\n"
+"if [ \"X$FIND_DISPLAY_NO_SHOW_XAUTH\" != \"X\" ]; then\n"
+" showxauth=\"\"\n"
+"fi\n"
"\n"
"# -f means use this xauthority file:\n"
"if [ \"X$1\" = \"X-f\" ]; then\n"
@@ -946,6 +949,9 @@ char find_display[] =
"\n"
"skip_display() {\n"
" dtry=$1\n"
+" dtry1=`echo \"$dtry\" | sed -e 's/^://'`\n"
+" dtry2=`echo \"$dtry\" | sed -e 's/\\.[0-9][0-9]*$//'`\n"
+"\n"
" if [ \"X$X11VNC_SKIP_DISPLAY\" = \"X\" ]; then\n"
" # no skip list, return display:\n"
" echo \"$dtry\"\n"
@@ -987,15 +993,26 @@ char find_display[] =
" else\n"
" skip=\":$skip\"\n"
" fi\n"
-" if echo \"$skip\" | grep \":$dtry\\>\" > /dev/null; then\n"
+" if echo \"$skip\" | grep \":$dtry1\\>\" > /dev/null; then\n"
+" mat=1\n"
+" break\n"
+" elif echo \"$skip\" | grep \":$dtry2\\>\" > /dev/null; then\n"
" mat=1\n"
" break\n"
" fi\n"
" done\n"
-" if [ \"X$mat\" = \"X1\" ]; then\n"
-" echo \"\"\n"
+" if [ \"X$X11VNC_SKIP_DISPLAY_NEGATE\" = \"X\" ]; then\n"
+" if [ \"X$mat\" = \"X1\" ]; then\n"
+" echo \"\"\n"
+" else\n"
+" echo \"$dtry\"\n"
+" fi\n"
" else\n"
-" echo \"$dtry\"\n"
+" if [ \"X$mat\" = \"X1\" ]; then\n"
+" echo \"$dtry\"\n"
+" else\n"
+" echo \"\"\n"
+" fi\n"
" fi\n"
" fi\n"
"}\n"
@@ -1327,7 +1344,9 @@ char find_display[] =
"# append ,VT=n if applicable:\n"
"dpy2=`prdpy \"$display\"`\n"
"\n"
-"echo \"DISPLAY=$dpy2\"\n"
+"if [ \"X$FIND_DISPLAY_NO_SHOW_DISPLAY\" = \"X\" ]; then\n"
+" echo \"DISPLAY=$dpy2\"\n"
+"fi\n"
"if [ \"X$FIND_DISPLAY_XAUTHORITY_PATH\" != \"X\" ]; then\n"
" # caller wants XAUTHORITY printed out too.\n"
" if [ \"X$xauth_use\" != \"X\" -a -f \"$xauth_use\" ]; then\n"