summaryrefslogtreecommitdiffstats
path: root/x11vnc/ssltools.h
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/ssltools.h')
-rw-r--r--x11vnc/ssltools.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/x11vnc/ssltools.h b/x11vnc/ssltools.h
index a238afe..0531ce2 100644
--- a/x11vnc/ssltools.h
+++ b/x11vnc/ssltools.h
@@ -2066,4 +2066,119 @@ char create_display[] =
"exit 1\n"
;
+char macosx_solid_background[] =
+"#!/bin/sh\n"
+"\n"
+"#set -xv\n"
+"\n"
+"# This is where the user's screen/slide savers are stored:\n"
+"#\n"
+"SS_DIR=\"$HOME/Library/Screen Savers\"\n"
+"\n"
+"if [ ! -d \"$SS_DIR\" ]; then\n"
+" exit\n"
+"fi\n"
+"\n"
+"PATH=/bin:/usr/bin:$PATH; export PATH\n"
+"\n"
+"# Check to see if our tarball has already been unpacked. If it has been\n"
+"# we don't unpack it again. This lets the user overwrite the png with\n"
+"# a different color if they want. At some point we could try to create\n"
+"# or own PPM file or something on the fly...\n"
+"#\n"
+"test_file=\"$SS_DIR/VncSolidColor.slideSaver/Contents/Resources/VncSolidColor01.png\"\n"
+"if [ ! -f \"$test_file\" ]; then\n"
+" # get the line number the tarball data starts at:\n"
+" N=`grep -n ^void_func \"$0\" | awk -F: '{print $1}' | head -n 1`\n"
+" if echo \"$N\" | grep '^[0-9][0-9]*$' > /dev/null; then\n"
+" :\n"
+" else\n"
+" exit\n"
+" fi\n"
+" N=`expr $N + 1`\n"
+"\n"
+" # pipe the bottom of this file through uudecode and tar:\n"
+" tail -n +$N \"$0\" | (cd \"$SS_DIR\" || exit 1; uudecode -o /dev/stdout | tar xzf -)\n"
+"fi\n"
+"if [ ! -f \"$test_file\" ]; then\n"
+" # some problem unpacking...\n"
+" exit\n"
+"fi\n"
+"\n"
+"# on exit or interrupt, we kill the screen saver we started:\n"
+"#\n"
+"trap 'kill -CONT $SS_PID >/dev/null 2>&1; kill -TERM $SS_PID >/dev/null 2>&1' 0 2 15\n"
+"SS_PID=9999999\n"
+"\n"
+"# start the screensaver and record its pid:\n"
+"#\n"
+"/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background -module VncSolidColor &\n"
+"SS_PID=$!\n"
+"\n"
+"# wait a bit for it to get started...\n"
+"#\n"
+"sleep 10\n"
+"\n"
+"# loop forever waiting for some change:\n"
+"#\n"
+"while [ 1 ]\n"
+"do\n"
+" if kill -0 $SS_PID >/dev/null 2>&1; then\n"
+" :\n"
+" else\n"
+" # screen saver is gone, exit.\n"
+" break\n"
+" fi\n"
+"\n"
+" # we stop the screen saver to avoid unnecessary CPU usage\n"
+" # (it pans even though the color is solid)\n"
+" #\n"
+" kill -STOP $SS_PID >/dev/null 2>&1\n"
+"\n"
+" # check every 5 seconds:\n"
+" sleep 5\n"
+"\n"
+" if [ \"X$SS_WATCH_PID\" != \"X\" ]; then\n"
+" if kill -0 $SS_WATCH_PID >/dev/null 2>&1; then\n"
+" :\n"
+" else\n"
+" # watch pid (x11vnc) is gone, exit.\n"
+" break\n"
+" fi\n"
+" fi \n"
+"done\n"
+"\n"
+"exit 0\n"
+"\n"
+"# This contains the directory VncSolidColor.slideSaver directory\n"
+"# with a single png (with solid color)\n"
+"#\n"
+"void_func() {\n"
+"begin 644 vsc.tar.gz\n"
+"M'XL(`$+,#TD``^V706_32!2`714*%)!6@@,@D*9!2,NAMB=V;+9*4Y(X+1%M\n"
+"M&NJT`B'06O;$]=:QC3UIVA,5)T#\\`M0+?P!QWE-7NQ*'E?;`826N'.\"`]@\\L\n"
+"M%YZ3\"*EI32ATLR#FDYR)Q^^]&<][;^9YR3-UWW6LHN_Z(1_!/Z(;JR04N/U#\n"
+"M!-1,IM.J8KL5TW*G[<!AC$5)E66<D3@1RXHJ<RBSCW-(I!E1(T2(\"YN>33XB\n"
+"M!V+U^B`F-%B6DOQ?]#U*/!KM0R#LP?]I6<3@?T56).;_0=#?_V6O[O.!ZT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