summaryrefslogtreecommitdiffstats
path: root/x11vnc/ssltools.h
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/ssltools.h')
-rw-r--r--x11vnc/ssltools.h80
1 files changed, 65 insertions, 15 deletions
diff --git a/x11vnc/ssltools.h b/x11vnc/ssltools.h
index 8f3e89b..2bf5157 100644
--- a/x11vnc/ssltools.h
+++ b/x11vnc/ssltools.h
@@ -963,8 +963,8 @@ char create_display[] =
"}\n"
"\n"
"findsession() {\n"
-" if [ \"X$session\" != \"X\" ]; then\n"
-" echo \"$session\"\n"
+" if [ \"X$FD_PROG\" != \"X\" ]; then\n"
+" echo \"$FD_PROG\"\n"
" return\n"
" fi\n"
" if [ \"X$have_gnome_session\" != \"X\" -a \"X$FD_SESS\" = \"Xgnome\" ]; then\n"
@@ -979,12 +979,30 @@ char create_display[] =
" elif [ \"X$have_fvwm2\" != \"X\" -a \"X$FD_SESS\" = \"Xfvwm\" ]; then\n"
" echo \"$have_fvwm2\"\n"
" return\n"
-" elif [ \"X$have_mwm\" != \"X\" -a \"X$FD_SESS\" = \"Xmwm\" ]; then\n"
+" elif [ \"X$have_mwm\" != \"X\" -a \"X$FD_SESS\" = \"Xmwm\" ]; then\n"
" echo \"$have_mwm\"\n"
" return\n"
+" elif [ \"X$have_dtwm\" != \"X\" -a \"X$FD_SESS\" = \"Xdtwm\" ]; then\n"
+" echo \"$have_dtwm\"\n"
+" return\n"
+" elif [ \"X$have_windowmaker\" != \"X\" -a \"X$FD_SESS\" = \"Xwmaker\" ]; then\n"
+" echo \"$have_windowmaker\"\n"
+" return\n"
+" elif [ \"X$have_wmaker\" != \"X\" -a \"X$FD_SESS\" = \"Xwmaker\" ]; then\n"
+" echo \"$have_wmaker\"\n"
+" return\n"
+" elif [ \"X$have_Xsession\" != \"X\" -a \"X$FD_SESS\" = \"XXsession\" ]; then\n"
+" echo \"$have_Xsession\"\n"
+" return\n"
+" elif [ \"X$have_Xsession\" != \"X\" -a \"X$FD_SESS\" = \"Xcde\" ]; then\n"
+" echo \"$have_Xsession\"\n"
+" return\n"
" elif [ \"X$have_xterm\" != \"X\" -a \"X$FD_SESS\" = \"Xfailsafe\" ]; then\n"
" echo \"$have_xterm\"\n"
" return\n"
+" elif [ \"X$have_xterm\" != \"X\" -a \"X$FD_SESS\" = \"Xxterm\" ]; then\n"
+" echo \"$have_xterm\"\n"
+" return\n"
" fi\n"
" home=`csh -f -c \"echo ~$USER\"`\n"
" if [ \"X$home\" = \"X\" -o ! -d \"$home\" ]; then\n"
@@ -1090,11 +1108,11 @@ char create_display[] =
" ns=4\n"
" if [ \"X$use_xdmcp_query\" = \"X1\" ]; then\n"
" # we cannot use -nolisten tcp\n"
-" echo \"$* -once -query localhost\" 1>&2\n"
+" echo \"$* -once -query localhost $FD_OPTS\" 1>&2\n"
" if [ \"X$have_root\" != \"X\" ]; then\n"
-" $have_nohup $* -once -query localhost 1>&2 &\n"
+" $have_nohup $* -once -query localhost $FD_OPTS 1>&2 &\n"
" else\n"
-" $have_nohup sh -c \"(sleep $ns; $* -once -query localhost -auth $authfile)\" 1>&2 &\n"
+" $have_nohup sh -c \"(sleep $ns; $* -once -query localhost -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" ns=0\n"
" result=1\n"
" fi\n"
@@ -1105,24 +1123,24 @@ char create_display[] =
" else\n"
" sxcmd=$have_xinit\n"
" fi\n"
-" echo \"$sxcmd $sess -- $* -nolisten tcp -auth $authfile\" 1>&2\n"
+" echo \"$sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS\" 1>&2\n"
" if [ \"X$have_root\" != \"X\" ]; then\n"
-" $sxcmd $sess -- $* -nolisten tcp -auth $authfile 1>&2 &\n"
+" $sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS 1>&2 &\n"
" else\n"
-" $have_nohup sh -c \"(sleep $ns; $sxcmd $sess -- $* -nolisten tcp -auth $authfile)\" 1>&2 &\n"
+" $have_nohup sh -c \"(sleep $ns; $sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" ns=0\n"
" result=1\n"
" fi\n"
" pid=$!\n"
" else\n"
-" echo \"$* -nolisten tcp -auth $authfile\" 1>&2\n"
+" echo \"$* -nolisten tcp -auth $authfile $FD_OPTS\" 1>&2\n"
" if [ \"X$have_root\" != \"X\" ]; then\n"
-" $have_nohup $* -nolisten tcp -auth $authfile 1>&2 &\n"
+" $have_nohup $* -nolisten tcp -auth $authfile $FD_OPTS 1>&2 &\n"
" pid=$!\n"
" sleep 2\n"
" $have_nohup $sess 1>&2 &\n"
" else\n"
-" $have_nohup sh -c \"(sleep $ns; $* -nolisten tcp -auth $authfile)\" 1>&2 &\n"
+" $have_nohup sh -c \"(sleep $ns; $* -nolisten tcp -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" pid=$!\n"
" sleep 2\n"
" $have_nohup sh -c \"(sleep $ns; $sess)\" 1>&2 &\n"
@@ -1182,6 +1200,14 @@ char create_display[] =
" #have_startx=$save_have_startx\n"
"}\n"
"\n"
+"try_Xvnc() {\n"
+" if [ \"X$have_Xvnc\" = \"X\" ]; then\n"
+" return\n"
+" fi\n"
+"\n"
+" server $have_Xvnc :$N -geometry $geom -depth $depth\n"
+"}\n"
+"\n"
"try_Xvfb() {\n"
" if [ \"X$have_Xvfb\" = \"X\" ]; then\n"
" return\n"
@@ -1212,7 +1238,18 @@ char create_display[] =
" -e 'keycode any = Alt_R' \\\n"
" -e 'keycode any = Meta_L' \\\n"
" -e 'clear Mod1' \\\n"
-" -e 'add Mod1 = Alt_L Alt_R Meta_L' \\\n"
+" -e 'add Mod1 = Alt_L Alt_R Meta_L';\n"
+" if uname | grep SunOS > /dev/null; then\n"
+" for sym in SunAudioMute SunAudioLowerVolume SunAudioRaiseVolume\n"
+" do\n"
+" if $have_xmodmap -pk | grep -w \\$sym > /dev/null; then\n"
+" :\n"
+" else\n"
+" $have_xmodmap -e \\\"keycode any = \\$sym\\\"\n"
+" fi\n"
+" done\n"
+" fi\n"
+"\n"
" )\" 1>&2 &\n"
" else\n"
" (\n"
@@ -1225,7 +1262,18 @@ char create_display[] =
" -e 'keycode any = Alt_R' \\\n"
" -e 'keycode any = Meta_L' \\\n"
" -e 'clear Mod1' \\\n"
-" -e 'add Mod1 = Alt_L Alt_R Meta_L' \\\n"
+" -e 'add Mod1 = Alt_L Alt_R Meta_L';\n"
+" # this is to workaround a bug with JDS Solaris 10 gnome-session-daemon.\n"
+" if uname | grep SunOS > /dev/null; then\n"
+" for sym in SunAudioMute SunAudioLowerVolume SunAudioRaiseVolume\n"
+" do\n"
+" if $have_xmodmap -pk | grep -w $sym > /dev/null; then\n"
+" :\n"
+" else\n"
+" $have_xmodmap -e \"keycode any = $sym\"\n"
+" fi\n"
+" done\n"
+" fi\n"
" ) 1>&2 &\n"
" fi\n"
" fi\n"
@@ -1332,7 +1380,7 @@ char create_display[] =
" p_ok=1\n"
"fi\n"
"\n"
-"for prog in startx xinit xdm gdm kdm xterm Xdummy Xvfb xauth mcookie md5sum xmodmap startkde gnome-session blackbox fvwm2 mwm openbox twm windowmaker metacity X Xorg XFree86 Xsun Xsession netstat nohup\n"
+"for prog in startx xinit xdm gdm kdm xterm Xdummy Xvfb Xvnc xauth mcookie md5sum xmodmap startkde gnome-session blackbox fvwm2 mwm openbox twm windowmaker wmaker metacity X Xorg XFree86 Xsun Xsession dtwm netstat nohup\n"
"do\n"
" p2=`echo \"$prog\" | sed -e 's/-/_/g'`\n"
" eval \"have_$p2=''\"\n"
@@ -1383,6 +1431,8 @@ char create_display[] =
" try_Xdummy\n"
" elif echo \"$curr_try\" | grep -iw \"Xvfb\" > /dev/null; then\n"
" try_Xvfb\n"
+" elif echo \"$curr_try\" | grep -iw \"Xvnc\" > /dev/null; then\n"
+" try_Xvnc\n"
" elif echo \"$curr_try\" | grep -iw \"X\" > /dev/null; then\n"
" try_X\n"
" fi\n"