Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 x11vnc (0.9.12-1build2) unstable; urgency=low
 .
   * add another user check
Author: root <root@console1-ub.ub.aau.at>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- x11vnc-0.9.12.orig/x11vnc/ssltools.h
+++ x11vnc-0.9.12/x11vnc/ssltools.h
@@ -1145,7 +1145,7 @@ char find_display[] =
 "# ALGE: fix\n"
 "xinitlist=\"\"\n"
 "for i in `ps axuwww| grep \"$user\"| grep xinit`; do xinitlist=\"$xinitlist \"`echo $i | awk '/^:[0-9][0-9]/ {print $0}'`; done\n"
-"if [ -z \"`echo $xinitlist|tr -t ' ' ''`\" ]; then exit 0; fi\n"
+"#if [ -z \"`echo $xinitlist|tr -t ' ' ''`\" ]; then exit 0; fi\n"
 "list=\"$list $xinitlist\"\n"
 "host=`hostname 2>/dev/null | sed -e 's/\\..*$//'`\n"
 "\n"
@@ -1271,6 +1271,7 @@ char find_display[] =
 "		do\n"
 "                       # ALGE, try only dpys in xinitlist\n"
 "                       xifound=0\n"
+" if [ -z \"`echo $xinitlist|tr -t ' ' ''`\" ]; then continue; fi\n"
 "                       for xi in $xinitlist; do\n"
 "                         if [ \"X$p\" = \"X$xi\" ]; then\n"
 "                           xifound=1\n"
@@ -1302,6 +1303,7 @@ char find_display[] =
 "		fi\n"
 "               xifound=0\n"
 "               # ALGE, try only dpys in xinitlist\n"
+" if [ -z \"`echo $xinitlist|tr -t ' ' ''`\" ]; then continue; fi\n"
 "               for xi in $xinitlist; do\n"
 "                 if [ \"X$p\" = \"X$xi\" ]; then\n"
 "                   xifound=1\n"
