diff options
author | runge <runge> | 2007-12-16 02:26:38 +0000 |
---|---|---|
committer | runge <runge> | 2007-12-16 02:26:38 +0000 |
commit | 3d0bd73627f7aa19d45488eeee49781ca9faa0f8 (patch) | |
tree | 6afda9c91d0be9cf6be2d0db0a094c0e76c38097 /x11vnc/ssltools.h | |
parent | 2689647d6c7a9ab9c88faacf5dbc0200e9bc4a24 (diff) | |
download | libtdevnc-3d0bd73627f7aa19d45488eeee49781ca9faa0f8.tar.gz libtdevnc-3d0bd73627f7aa19d45488eeee49781ca9faa0f8.zip |
x11vnc: fix find_display and usleep() prototype on macosx.
-display console and check DISPLAY /tmp/...:0 on macosx.
implement -noxinerama.
Diffstat (limited to 'x11vnc/ssltools.h')
-rw-r--r-- | x11vnc/ssltools.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/x11vnc/ssltools.h b/x11vnc/ssltools.h index cd61a15..ace6511 100644 --- a/x11vnc/ssltools.h +++ b/x11vnc/ssltools.h @@ -848,17 +848,29 @@ char find_display[] = "# who(1) output column 2:\n" "#gone=`last $user | grep 'gone.*no.logout' | awk '{print $2}' | grep '^:' | sed -e 's,/.*,,' | tr '\\n' '|'`\n" "#gone=\"${gone}__quite_impossible__\"\n" -"#display=`who | grep \"^${user}[ ][ ]*:[0-9]\" | egrep -v \" ($gone)\\>\" | head -n 1 \\\n" +"#display=`who 2>/dev/null | grep \"^${user}[ ][ ]*:[0-9]\" | egrep -v \" ($gone)\\>\" | head -n 1 \\\n" "# | awk '{print $2}' | sed -e 's,/.*$,,'`\n" "poss=\"\"\n" -"list=`who | grep \"^${user}[ ][ ]*:[0-9]\" | awk '{print $2}' | sed -e 's,/.*$,,'`\n" -"list=\"$list \"`w -h \"$user\" | grep \"^${user}[ ][ ]*:[0-9]\" | awk '{print $2}' | sed -e 's,/.*$,,'`\n" -"list=\"$list \"`who | grep \"^${user}[ ]\" | awk '{print $NF}' | grep '(:[0-9]' | sed -e 's/[()]//g'`\n" -"host=`hostname | sed -e 's/\\..*$//'`\n" +"list=`who 2>/dev/null | grep \"^${user}[ ][ ]*:[0-9]\" | awk '{print $2}' | sed -e 's,/.*$,,'`\n" +"list=\"$list \"`w -h \"$user\" 2>/dev/null | grep \"^${user}[ ][ ]*:[0-9]\" | awk '{print $2}' | sed -e 's,/.*$,,'`\n" +"list=\"$list \"`who 2>/dev/null | grep \"^${user}[ ]\" | awk '{print $NF}' | grep '(:[0-9]' | sed -e 's/[()]//g'`\n" +"host=`hostname 2>/dev/null | sed -e 's/\\..*$//'`\n" "if [ \"X$X11VNC_FINDDISPLAY_SKIP_XAUTH\" = \"X\" ]; then\n" " list=\"$list \"`xauth list | awk '{print $1}' | grep /unix | grep \"^${host}\" | sed -e 's/^.*:/:/' | sort -n | uniq`\n" "fi\n" "\n" +"if [ \"X$uname\" = \"XDarwin\" ]; then\n" +" if who 2>/dev/null | grep -i \"^${user}[ ][ ]*console[ ]\" > /dev/null; then\n" +" echo \"DISPLAY=console\"\n" +" if [ \"X$FIND_DISPLAY_ALL\" = \"X\" ]; then\n" +" if [ \"X$showxauth\" != \"X\" ]; then\n" +" echo \"\"\n" +" fi\n" +" exit 0\n" +" fi\n" +" fi\n" +"fi\n" +"\n" "for p in $list\n" "do\n" " xa=`echo \"$p\" | awk -F, '{print $2}'`\n" |