Commit 5764cd3f authored by runge's avatar runge

x11vnc: Fix problems in --without-x builds. Fix crash

with -QD query for dbus info.  Adjust window size for
small screens in -gui.  Improve F1 help for xdm, etc.
include ssvnc 1.0.25 source.
parent 018f152b
2009-12-28 Karl Runge <runge@karlrunge.com>
* x11vnc: Fix problems in --without-x builds. Fix crash
with -QD query for dbus info. Adjust window size for
small screens in -gui. Improve F1 help for xdm, etc.
include ssvnc 1.0.25 source.
2009-12-24 Karl Runge <runge@karlrunge.com> 2009-12-24 Karl Runge <runge@karlrunge.com>
* x11vnc: prepare_x11vnc_dist.sh for 0.9.10. -xdummy_xvfb, * x11vnc: prepare_x11vnc_dist.sh for 0.9.10. -xdummy_xvfb,
-svc_xdummy_xvfb and -create_x shorthand. lxde session. -svc_xdummy_xvfb and -create_x shorthand. lxde session.
......
This diff is collapsed.
...@@ -563,6 +563,9 @@ static void be_helper_pid(char *dpy_str) { ...@@ -563,6 +563,9 @@ static void be_helper_pid(char *dpy_str) {
if (ms < 50) ms = 50; if (ms < 50) ms = 50;
#if NO_X11
fprintf(stderr, "be_helper_pid: not compiled with X11.\n");
#else
dpy = XOpenDisplay(dpy_str); dpy = XOpenDisplay(dpy_str);
ticker_atom = XInternAtom(dpy, ticker_atom_str, False); ticker_atom = XInternAtom(dpy, ticker_atom_str, False);
...@@ -583,6 +586,7 @@ static void be_helper_pid(char *dpy_str) { ...@@ -583,6 +586,7 @@ static void be_helper_pid(char *dpy_str) {
} }
} }
} }
#endif
exit(0); exit(0);
} }
...@@ -895,7 +899,7 @@ static void delete_win(Window win) { ...@@ -895,7 +899,7 @@ static void delete_win(Window win) {
static void recurse_search(int level, int level_max, Window top, Window app, int *nw) { static void recurse_search(int level, int level_max, Window top, Window app, int *nw) {
Window w, r, parent, *list = NULL; Window w, r, parent, *list = NULL;
unsigned int nchild; unsigned int nchild;
int ok; int ok = 0;
if (appshare_debug > 1) { if (appshare_debug > 1) {
fprintf(stderr, "level: %d level_max: %d top: 0x%lx app: 0x%lx\n", level, level_max, top, app); fprintf(stderr, "level: %d level_max: %d top: 0x%lx app: 0x%lx\n", level, level_max, top, app);
...@@ -904,6 +908,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int ...@@ -904,6 +908,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int
return; return;
} }
#if !NO_X11
ok = XQueryTree(dpy, top, &r, &parent, &list, &nchild); ok = XQueryTree(dpy, top, &r, &parent, &list, &nchild);
if (ok) { if (ok) {
int i; int i;
...@@ -930,6 +935,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int ...@@ -930,6 +935,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int
if (list) { if (list) {
XFree(list); XFree(list);
} }
#endif
} }
static void add_app(Window app) { static void add_app(Window app) {
......
...@@ -652,7 +652,8 @@ if [ -e "$xserver_path" -a "X$root" = "X" -a "X$runit" != "X" ]; then ...@@ -652,7 +652,8 @@ if [ -e "$xserver_path" -a "X$root" = "X" -a "X$runit" != "X" ]; then
warn "" warn ""
warn "Please restart Xdummy now." warn "Please restart Xdummy now."
exit 0 exit 0
elif [ ! -O $new ]; then fi
if [ ! -O $new ]; then
warn "file \"$new\" not owned by us!" warn "file \"$new\" not owned by us!"
ls -l $new ls -l $new
exit 1 exit 1
......
...@@ -17,6 +17,7 @@ SYNOPSIS ...@@ -17,6 +17,7 @@ SYNOPSIS
ssvnc [host][:display] ssvnc [host][:display]
ssvnc [saved-profile-name] ssvnc [saved-profile-name]
ssvnc [options] [host-or-profile] ssvnc [options] [host-or-profile]
ssvnc -cmd [ssvnc_cmd-args]
ssvnc --help ssvnc --help
DESCRIPTION DESCRIPTION
...@@ -33,6 +34,12 @@ OPTIONS ...@@ -33,6 +34,12 @@ OPTIONS
--help Starts up the GUI as though the 'Help' button was pressed to --help Starts up the GUI as though the 'Help' button was pressed to
show the main Help panel. show the main Help panel.
-cmd [ssvnc_cmd-args]
Launch the ssvnc_cmd utility command directly (no GUI) with the
given arguments (for use when ssvnc_cmd is not in one's PATH.)
If neither ssvnc_cmd nor ssvncviewer is in PATH, one can launch
the viewer directly via: ssvnc -cmd -viewer [viewer-args]
-profiles -profiles
List the saved SSVNC profiles you have created. A profile is a List the saved SSVNC profiles you have created. A profile is a
destination host with specific parameter settings. destination host with specific parameter settings.
...@@ -67,7 +74,8 @@ OPTIONS ...@@ -67,7 +74,8 @@ OPTIONS
present. You can toggle the mode with Ctrl-E. Same as present. You can toggle the mode with Ctrl-E. Same as
SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc. SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc.
Selecting no encryption is the same as the vnc:// and Vnc:// Selecting no encryption is the same as the vnc:// and Vnc://
prefixes described below. -enc implies the opposite. prefixes described below. The -noenc mode is now the default,
use -enc or noenc=0 for the opposite behavior.
-killstunnel -killstunnel
On Windows, automatically terminate the STUNNEL process when the On Windows, automatically terminate the STUNNEL process when the
...@@ -271,7 +279,7 @@ if [ -f "$dir/util/ultraftp.jar" ]; then ...@@ -271,7 +279,7 @@ if [ -f "$dir/util/ultraftp.jar" ]; then
export SSVNC_ULTRA_FTP_JAR export SSVNC_ULTRA_FTP_JAR
fi fi
if [ "X$1" = "X-cmd" ]; then if [ "X$1" = "X-cmd" -o "X$1" = "X--cmd" ]; then
shift shift
exec ssvnc_cmd "$@" exec ssvnc_cmd "$@"
elif [ "X$WISH" = "Xwish" ]; then elif [ "X$WISH" = "Xwish" ]; then
......
...@@ -25,13 +25,16 @@ ...@@ -25,13 +25,16 @@
# #
# ssvnc_cmd [ss_vncviewer-args] hostname:N [vncviewer-args] # ssvnc_cmd [ss_vncviewer-args] hostname:N [vncviewer-args]
# #
# if, instead, this script is named "tightvncviewer" it calls the # if, instead, this script is named "tightvncviewer" or "-viewer" is the
# vncviewer directly and must be invoked as: # first argument it calls the vncviewer directly (there is no encryption)
# and must be invoked as:
# #
# tightvncviewer [vncviewer-args] hostname:N # tightvncviewer [vncviewer-args] hostname:N
# or
# ssvnc_cmd -viewer [vncviewer-args] hostname:N
# #
# In both cases, "hostname:N" is the host and VNC display to connect to, # In both cases, "hostname:N" is the host and VNC display to connect to,
# e.g. snoopy:0 # e.g. snoopy:0. (-listen N and -appshare N modes works too.)
# #
# See the script util/ss_vncviewer for details about its arguments: # See the script util/ss_vncviewer for details about its arguments:
# #
...@@ -240,6 +243,15 @@ if [ "X$1" = "X-ssl" ]; then ...@@ -240,6 +243,15 @@ if [ "X$1" = "X-ssl" ]; then
base="ssvnc_cmd" base="ssvnc_cmd"
fi fi
do_viewer_directly=""
if [ "X$1" = "X-viewer" ]; then
do_viewer_directly=1
shift
fi
if [ "X$base" = "Xtightvncviewer" ]; then
do_viewer_directly=1
fi
# If ours (and not cotvnc), force the use of tight encoding for localhost # If ours (and not cotvnc), force the use of tight encoding for localhost
# redir connection: # redir connection:
# #
...@@ -260,13 +272,13 @@ if [ $use_ours = 1 ]; then ...@@ -260,13 +272,13 @@ if [ $use_ours = 1 ]; then
fi fi
fi fi
if [ "X$base" = "Xtightvncviewer" ]; then if [ "X$do_viewer_directly" = "X1" ]; then
$VNCVIEWERCMD -encodings 'copyrect tight zrle zlib hextile' "$@" $VNCVIEWERCMD -encodings 'copyrect tight zrle zlib hextile' "$@"
else else
ss_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile' ss_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile'
fi fi
else else
if [ "X$base" = "Xtightvncviewer" ]; then if [ "X$do_viewer_directly" = "X1" ]; then
$VNCVIEWERCMD "$@" $VNCVIEWERCMD "$@"
else else
ss_vncviewer "$@" ss_vncviewer "$@"
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
.\" ** The above line should force tbl to be a preprocessor ** .\" ** The above line should force tbl to be a preprocessor **
.\" Man page for the SSVNC vncviewer .\" Man page for the SSVNC vncviewer
.\" .\"
.\" Copyright (C) 2006-2008 Karl J. Runge <runge@karlrunge.com> .\" Copyright (C) 2006-2009 Karl J. Runge <runge@karlrunge.com>
.\" .\"
.\" You may distribute under the terms of the GNU General Public .\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file LICENCE.TXT that comes with the .\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution. .\" TightVNC distribution.
.\" .\"
.TH ssvnc 1 "September 2009" "" "SSVNC" .TH ssvnc 1 "December 2009" "" "SSVNC"
.SH NAME .SH NAME
ssvnc \- a GUI wrapper for SSL and SSH VNC connections. ssvnc \- a GUI wrapper for SSL and SSH VNC connections.
.SH SYNOPSIS .SH SYNOPSIS
...@@ -24,6 +24,10 @@ ssvnc \- a GUI wrapper for SSL and SSH VNC connections. ...@@ -24,6 +24,10 @@ ssvnc \- a GUI wrapper for SSL and SSH VNC connections.
.RI [\| options \|]\ [\| host-or-profile \] .RI [\| options \|]\ [\| host-or-profile \]
.br .br
.B ssvnc .B ssvnc
.IR \-cmd
.RI [\| ssvnc_cmd-args \|]
.br
.B ssvnc
.IR \--help .IR \--help
.br .br
.SH DESCRIPTION .SH DESCRIPTION
...@@ -47,10 +51,10 @@ Or supply user@hostname:display and click on the "Use SSH" option, then ...@@ -47,10 +51,10 @@ Or supply user@hostname:display and click on the "Use SSH" option, then
press the "Connect" button to connect to the server via an SSH tunnel. press the "Connect" button to connect to the server via an SSH tunnel.
E.g. "fred@far-away.east:0". E.g. "fred@far-away.east:0".
As an easter egg, we note it is also possible to disable the use of SSL/SSH Note it is also possible to disable the use of SSL/SSH
encryption tunnels by using a vnc:// or Vnc:// prefix before encryption tunnels by using a vnc:// or Vnc:// prefix before
host:display. Shift+Ctrl-E is a short-cut to add/remove it. host:display. Shift+Ctrl-E is a short-cut to add/remove it.
See also the \fB-noenc\fR option below. See also the \fB-noenc\fR option below for the 'No Encryption' button.
Normally you do not specify any command line options. You simply Normally you do not specify any command line options. You simply
run \fBssvnc\fR and use the GUI that starts up. run \fBssvnc\fR and use the GUI that starts up.
...@@ -70,6 +74,12 @@ See below and the application Help for more information on the modes. ...@@ -70,6 +74,12 @@ See below and the application Help for more information on the modes.
You can also place certain settings in your ~/.ssvncrc, see the You can also place certain settings in your ~/.ssvncrc, see the
SSVNC Help panel ('Tips') for more info. SSVNC Help panel ('Tips') for more info.
The \fB-cmd\fR option does not start the GUI, it runs the command
line utility \fBssvnc_cmd\fR directly with the given arguments.
\fBssvnc_cmd\fR can launch the viewer directly (\fB-viewer ...\fR)
or, by default, the \fBss_vncviewer\fR SSL/SSH tunnel wrapper script.
See its help output for more information.
There are also some command line options described as follows. There are also some command line options described as follows.
.SH OPTIONS .SH OPTIONS
.TP .TP
...@@ -80,6 +90,12 @@ Prints out to the terminal a brief description and the options. ...@@ -80,6 +90,12 @@ Prints out to the terminal a brief description and the options.
Starts up the GUI as though the 'Help' button was pressed to show the Starts up the GUI as though the 'Help' button was pressed to show the
main Help panel. main Help panel.
.TP .TP
\fB\-cmd\fR \fI[ssvnc_cmd-args]\fR
Launch the ssvnc_cmd utility command directly (no GUI) with the given
arguments (for use when ssvnc_cmd is not in one's PATH.) If neither
ssvnc_cmd nor ssvncviewer is in PATH, one can launch the viewer
directly via: ssvnc -cmd -viewer [viewer-args]
.TP
\fB\-profiles\fR \fB\-profiles\fR
List the saved SSVNC profiles you have created. A profile List the saved SSVNC profiles you have created. A profile
is a destination host with specific parameter settings. is a destination host with specific parameter settings.
...@@ -122,7 +138,8 @@ Start off in a mode where a 'No Encryption' check button is present. ...@@ -122,7 +138,8 @@ Start off in a mode where a 'No Encryption' check button is present.
You can toggle the mode with Ctrl-E. You can toggle the mode with Ctrl-E.
Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or \fInoenc=1\fR in ~/.ssvncrc. Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or \fInoenc=1\fR in ~/.ssvncrc.
Selecting no encryption is the same as the vnc:// and Vnc:// prefixes Selecting no encryption is the same as the vnc:// and Vnc:// prefixes
described below. \fB-enc\fR implies the opposite. described below. The \fB\-noenc\fR mode is now the default, use \fB-enc\fR
or \fInoenc=0\fR for the opposite behavior.
.TP .TP
\fB\-killstunnel\fR \fB\-killstunnel\fR
On Windows, automatically terminate the STUNNEL process when the viewer On Windows, automatically terminate the STUNNEL process when the viewer
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" License as specified in the file LICENCE.TXT that comes with the .\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution. .\" TightVNC distribution.
.\" .\"
.TH ssvncviewer 1 "September 2009" "" "SSVNC" .TH ssvncviewer 1 "December 2009" "" "SSVNC"
.SH NAME .SH NAME
ssvncviewer \- an X viewer client for VNC ssvncviewer \- an X viewer client for VNC
.SH SYNOPSIS .SH SYNOPSIS
...@@ -465,6 +465,18 @@ as possible instead of waiting until the end of the current ...@@ -465,6 +465,18 @@ as possible instead of waiting until the end of the current
framebuffer update coming in. Helps 'pipeline' the updates. framebuffer update coming in. Helps 'pipeline' the updates.
This is currently the default, use \fB-nopipeline\fR to disable. This is currently the default, use \fB-nopipeline\fR to disable.
.TP .TP
\fB\-appshare\fR
Enable features for use with x11vnc's \fB\-appshare\fR mode where
instead of sharing the full desktop only the application's
windows are shared. Viewer multilisten mode is used to
create the multiple windows: \fB\-multilisten\fR is implied.
See 'x11vnc \fB\-appshare\fR \fB\-help\fR' more information on the mode.
Features enabled in the viewer under \fB\-appshare\fR are:
Minimum extra text in the title, auto \fB\-ycrop\fR is disabled,
x11vnc \fB\-remote_prefix\fR X11VNC_APPSHARE_CMD: message channel,
x11vnc initial window position hints. See also Escape Keys
below for additional key and mouse bindings.
.TP
\fB\-escape \fR\fIstr\fR \fB\-escape \fR\fIstr\fR
This sets the 'Escape Keys' modifier sequence and enables This sets the 'Escape Keys' modifier sequence and enables
escape keys mode. When the modifier keys escape sequence escape keys mode. When the modifier keys escape sequence
...@@ -511,6 +523,18 @@ Clicking Mouse Button3 brings up the Popup Menu. ...@@ -511,6 +523,18 @@ Clicking Mouse Button3 brings up the Popup Menu.
The above mappings are \fBalways\fR active in ViewOnly mode, unless you set The above mappings are \fBalways\fR active in ViewOnly mode, unless you set
the Escape Keys value to 'never'. the Escape Keys value to 'never'.
x11vnc -appshare hot-keys: x11vnc has a simple application sharing mode
that enables the viewer-side to move, resize, or raise the remote toplevel
windows. To enable it, hold down Shift + the Escape Keys and press these:
Arrow keys: move the remote window around in its desktop.
PageUp/PageDn/Home/End: resize the remote window.
+/-: raise or lower the remote window.
M or Button1 move win to local position; D or Button3: delete remote win.
If the Escape Keys value below is set to 'default' then a default list of If the Escape Keys value below is set to 'default' then a default list of
of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it
is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag
......
...@@ -5920,7 +5920,9 @@ char *process_remote_cmd(char *cmd, int stringonly) { ...@@ -5920,7 +5920,9 @@ char *process_remote_cmd(char *cmd, int stringonly) {
grab_state(&ptr_grabbed, &kbd_grabbed); grab_state(&ptr_grabbed, &kbd_grabbed);
snprintf(buf, bufn, "aro=%s:%d,%d", p, ptr_grabbed, kbd_grabbed); snprintf(buf, bufn, "aro=%s:%d,%d", p, ptr_grabbed, kbd_grabbed);
if (dpy) {
rfbLog("remote_cmd: ptr,kbd: %s\n", buf); rfbLog("remote_cmd: ptr,kbd: %s\n", buf);
}
goto qry; goto qry;
} }
......
...@@ -561,6 +561,9 @@ char *dbus_session(void) { ...@@ -561,6 +561,9 @@ char *dbus_session(void) {
if (dbus_env != NULL && strlen(dbus_env) > 0) { if (dbus_env != NULL && strlen(dbus_env) > 0) {
return ""; return "";
} }
if (!dpy) {
return "";
}
#if NO_X11 #if NO_X11
return ""; return "";
#else #else
......
...@@ -2532,7 +2532,7 @@ proc see_if_ok {query item expected} { ...@@ -2532,7 +2532,7 @@ proc see_if_ok {query item expected} {
} }
proc get_default_vars {} { proc get_default_vars {} {
global default_var global default_var env
set qry [all_query_vars] set qry [all_query_vars]
...@@ -2550,6 +2550,11 @@ proc get_default_vars {} { ...@@ -2550,6 +2550,11 @@ proc get_default_vars {} {
if {$i > 50} { if {$i > 50} {
set qargs [list "-QD" $q] set qargs [list "-QD" $q]
set a [run_remote_cmd $qargs] set a [run_remote_cmd $qargs]
if [info exists env(TKX11VNC_PRINT_ALL_QD)] {
puts $q
puts $a
puts "---------------"
}
if {$all != ""} { if {$all != ""} {
append all "," append all ","
} }
...@@ -2561,6 +2566,11 @@ proc get_default_vars {} { ...@@ -2561,6 +2566,11 @@ proc get_default_vars {} {
if {$q != ""} { if {$q != ""} {
set qargs [list "-QD" $q] set qargs [list "-QD" $q]
set a [run_remote_cmd $qargs] set a [run_remote_cmd $qargs]
if [info exists env(TKX11VNC_PRINT_ALL_QD)] {
puts $q
puts $a
puts "---------------"
}
if {$all != ""} { if {$all != ""} {
append all "," append all ","
} }
...@@ -5982,6 +5992,8 @@ proc get_settings_rcfile {} { ...@@ -5982,6 +5992,8 @@ proc get_settings_rcfile {} {
set qst $hmm set qst $hmm
} elseif {$item == "nevershared"} { } elseif {$item == "nevershared"} {
set qst $hmm set qst $hmm
} elseif {$item == "gui"} {
set qst $hmm
} }
if {![info exists menu_var($item)]} { if {![info exists menu_var($item)]} {
...@@ -6956,7 +6968,10 @@ if {$tk_version < 8.4} { ...@@ -6956,7 +6968,10 @@ if {$tk_version < 8.4} {
set screen_height [winfo screenheight .] set screen_height [winfo screenheight .]
set screen_width [winfo screenwidth .] set screen_width [winfo screenwidth .]
if {$screen_height < 500} { if {$screen_height < 700} {
# short screen, netbook?
set max_text_height 30
if {$screen_height < 500} {
# short screen, PDA? # short screen, PDA?
set max_text_height 22 set max_text_height 22
set text_height 13 set text_height 13
...@@ -6966,6 +6981,7 @@ if {$screen_height < 500} { ...@@ -6966,6 +6981,7 @@ if {$screen_height < 500} {
set max_text_width 60 set max_text_width 60
set text_height 11 set text_height 11
} }
}
} }
if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} { if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {
set max_text_height $env(X11VNC_GUI_TEXT_HEIGHT) set max_text_height $env(X11VNC_GUI_TEXT_HEIGHT)
......
...@@ -2543,7 +2543,7 @@ char gui_code[] = ""; ...@@ -2543,7 +2543,7 @@ char gui_code[] = "";
"}\n" "}\n"
"\n" "\n"
"proc get_default_vars {} {\n" "proc get_default_vars {} {\n"
" global default_var\n" " global default_var env\n"
"\n" "\n"
" set qry [all_query_vars]\n" " set qry [all_query_vars]\n"
"\n" "\n"
...@@ -2561,6 +2561,11 @@ char gui_code[] = ""; ...@@ -2561,6 +2561,11 @@ char gui_code[] = "";
" if {$i > 50} {\n" " if {$i > 50} {\n"
" set qargs [list \"-QD\" $q]\n" " set qargs [list \"-QD\" $q]\n"
" set a [run_remote_cmd $qargs]\n" " set a [run_remote_cmd $qargs]\n"
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
" puts $q\n"
" puts $a\n"
" puts \"---------------\"\n"
" }\n"
" if {$all != \"\"} {\n" " if {$all != \"\"} {\n"
" append all \",\"\n" " append all \",\"\n"
" }\n" " }\n"
...@@ -2572,6 +2577,11 @@ char gui_code[] = ""; ...@@ -2572,6 +2577,11 @@ char gui_code[] = "";
" if {$q != \"\"} {\n" " if {$q != \"\"} {\n"
" set qargs [list \"-QD\" $q]\n" " set qargs [list \"-QD\" $q]\n"
" set a [run_remote_cmd $qargs]\n" " set a [run_remote_cmd $qargs]\n"
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
" puts $q\n"
" puts $a\n"
" puts \"---------------\"\n"
" }\n"
" if {$all != \"\"} {\n" " if {$all != \"\"} {\n"
" append all \",\"\n" " append all \",\"\n"
" }\n" " }\n"
...@@ -5993,6 +6003,8 @@ char gui_code[] = ""; ...@@ -5993,6 +6003,8 @@ char gui_code[] = "";
" set qst $hmm\n" " set qst $hmm\n"
" } elseif {$item == \"nevershared\"} {\n" " } elseif {$item == \"nevershared\"} {\n"
" set qst $hmm\n" " set qst $hmm\n"
" } elseif {$item == \"gui\"} {\n"
" set qst $hmm\n"
" }\n" " }\n"
"\n" "\n"
" if {![info exists menu_var($item)]} {\n" " if {![info exists menu_var($item)]} {\n"
...@@ -6967,7 +6979,10 @@ char gui_code[] = ""; ...@@ -6967,7 +6979,10 @@ char gui_code[] = "";
"\n" "\n"
"set screen_height [winfo screenheight .]\n" "set screen_height [winfo screenheight .]\n"
"set screen_width [winfo screenwidth .]\n" "set screen_width [winfo screenwidth .]\n"
"if {$screen_height < 500} {\n" "if {$screen_height < 700} {\n"
" # short screen, netbook?\n"
" set max_text_height 30\n"
" if {$screen_height < 500} {\n"
" # short screen, PDA?\n" " # short screen, PDA?\n"
" set max_text_height 22\n" " set max_text_height 22\n"
" set text_height 13\n" " set text_height 13\n"
...@@ -6977,6 +6992,7 @@ char gui_code[] = ""; ...@@ -6977,6 +6992,7 @@ char gui_code[] = "";
" set max_text_width 60\n" " set max_text_width 60\n"
" set text_height 11\n" " set text_height 11\n"
" }\n" " }\n"
" }\n"
"}\n" "}\n"
"if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {\n" "if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {\n"
" set max_text_height $env(X11VNC_GUI_TEXT_HEIGHT)\n" " set max_text_height $env(X11VNC_GUI_TEXT_HEIGHT)\n"
......
...@@ -444,6 +444,9 @@ void unixpw_screen(int init) { ...@@ -444,6 +444,9 @@ void unixpw_screen(int init) {
x = nfix(dpy_x / 2 - strlen(log) * char_w, dpy_x); x = nfix(dpy_x / 2 - strlen(log) * char_w, dpy_x);
y = (int) (dpy_y / 3.5); y = (int) (dpy_y / 3.5);
if (unixpw_system_greeter) {
y = (int) (dpy_y / 3);
}
if (scaling) { if (scaling) {
x = (int) (x * scale_fac_x); x = (int) (x * scale_fac_x);
...@@ -461,7 +464,7 @@ void unixpw_screen(int init) { ...@@ -461,7 +464,7 @@ void unixpw_screen(int init) {
pscreen = screen; pscreen = screen;
} }
if (pscreen && pscreen->width >= 640) { if (pscreen && pscreen->width >= 640 && pscreen->height >= 480) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*13, "F1-Help:", white_pixel()); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*13, "F1-Help:", white_pixel());
} }
f1_help = 0; f1_help = 0;
...@@ -473,8 +476,8 @@ void unixpw_screen(int init) { ...@@ -473,8 +476,8 @@ void unixpw_screen(int init) {
char moo[] = "Press 'Escape' for System Greeter"; char moo[] = "Press 'Escape' for System Greeter";
rfbDrawString(pscreen, &default8x16Font, x-90, y-30, moo, white_pixel()); rfbDrawString(pscreen, &default8x16Font, x-90, y-30, moo, white_pixel());
} else { } else {
char moo1[] = "Press 'Escape' for New Session via System Greeter,"; char moo1[] = "Press 'Escape' for a New Session via System Greeter, or";
char moo2[] = "or otherwise login here for Existing Session: "; char moo2[] = "otherwise login here to connect to an Existing Session:";
rfbDrawString(pscreen, &default6x13Font, x-110, y-38, moo1, white_pixel()); rfbDrawString(pscreen, &default6x13Font, x-110, y-38, moo1, white_pixel());
rfbDrawString(pscreen, &default6x13Font, x-110, y-25, moo2, white_pixel()); rfbDrawString(pscreen, &default6x13Font, x-110, y-25, moo2, white_pixel());
} }
...@@ -1210,7 +1213,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int ...@@ -1210,7 +1213,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int
* auth sufficient pam_self.so * auth sufficient pam_self.so
* it may be commented out without problem. * it may be commented out without problem.
*/ */
for (i=0; i<sizeof(instr); i++) { for (i=0; i< (int) sizeof(instr); i++) {
instr[i] = '\0'; instr[i] = '\0';
} }
...@@ -1253,7 +1256,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int ...@@ -1253,7 +1256,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int
if (i < -1) i = -1; if (i < -1) i = -1;
continue; continue;
} }
if (j >= sizeof(instr)-1) { if (j >= (int) sizeof(instr)-1) {
rfbLog("su_verify: problem finding Password:\n"); rfbLog("su_verify: problem finding Password:\n");
fflush(stderr); fflush(stderr);
return 0; return 0;
...@@ -1700,14 +1703,20 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { ...@@ -1700,14 +1703,20 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) {
} else if (! down) { } else if (! down) {
return; return;
} }
if (keysym == XK_F1 && pscreen && pscreen->width >= 640) { if (keysym == XK_F1) {
char h1[] = "F1-Help: For 'login:' type in the username and press Enter, then for 'Password:' type in the password."; char h1[] = "F1-Help: For 'login:' type in the username and press Enter, then for 'Password:' enter the password.";
char hf[] = " Once logged in, username's X session will be searched for and if found then attached to.";
char hc[] = " Once logged in, username's X session is sought and attached to, otherwise a new session is created.";
char hx[] = " Once logged in, username's X session is sought and attached to, otherwise a login greeter is presented.";
char h2[] = " Specify options after a ':' like this: username:opt,opt=val,... Where an opt may be any of:"; char h2[] = " Specify options after a ':' like this: username:opt,opt=val,... Where an opt may be any of:";
char h3[] = " scale=... (n/m); scale_cursor=... (sc=); solid (so); id=; repeat; clear_mods (cm); clear_keys (ck);"; char h3[] = " scale=... (n/m); scale_cursor=... (sc=); solid (so); id=; repeat; clear_mods (cm); clear_keys (ck);";
char h4[] = " clear_all (ca); speeds=... (sp=); readtimeout=... (rd=) rotate=... (ro=); noncache (nc) (nc=n);"; char h4[] = " clear_all (ca); speeds=... (sp=); readtimeout=... (rd=) rotate=... (ro=); noncache (nc) (nc=n);";
char h5[] = " geom=WxHxD (ge=); nodisplay=... (nd=); viewonly (vo); tag=...; gnome kde twm fvwm mwm dtwm wmaker"; char h5[] = " geom=WxHxD (ge=); nodisplay=... (nd=); viewonly (vo); tag=...; gnome kde twm fvwm mwm dtwm wmaker";
char h6[] = " xfce lxde enlightenment Xsession failsafe. Examples: fred:3/4,so,cm wilma:geom=1024x768x16,kde"; char h6[] = " xfce lxde enlightenment Xsession failsafe. Examples: fred:3/4,so,cm wilma:geom=1024x768x16,kde";
int ch = 13, p; int ch = 13, p;
if (!pscreen || pscreen->width < 640 || pscreen->height < 480) {
return;
}
if (f1_help) { if (f1_help) {
p = black_pixel(); p = black_pixel();
f1_help = 0; f1_help = 0;
...@@ -1717,11 +1726,22 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { ...@@ -1717,11 +1726,22 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) {
unixpw_last_try_time = time(NULL) + 45; unixpw_last_try_time = time(NULL) + 45;
} }
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, h1, p); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, h1, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, h2, p); if (use_dpy == NULL) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+3*ch, h3, p); ;
rfbDrawString(pscreen, &default6x13Font, 8, 2+4*ch, h4, p); } else if (strstr(use_dpy, "cmd=FINDDISPLAY")) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+5*ch, h5, p); rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hf, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+6*ch, h6, p); } else if (strstr(use_dpy, "cmd=FINDCREATEDISPLAY")) {
if (strstr(use_dpy, "xdmcp")) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hx, p);
} else {
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hc, p);
}
}
rfbDrawString(pscreen, &default6x13Font, 8, 2+3*ch, h2, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+4*ch, h3, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+5*ch, h4, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+6*ch, h5, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+7*ch, h6, p);
if (!f1_help) { if (!f1_help) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, "F1-Help:", white_pixel()); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, "F1-Help:", white_pixel());
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "December 2009" "x11vnc " "User Commands" .TH X11VNC "1" "December 2009" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.9.10, lastmod: 2009-12-24 version: 0.9.10, lastmod: 2009-12-27
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -5018,6 +5018,7 @@ int main(int argc, char* argv[]) { ...@@ -5018,6 +5018,7 @@ int main(int argc, char* argv[]) {
} }
if (dpy && !xrandr && !got_noxrandr) { if (dpy && !xrandr && !got_noxrandr) {
#if !NO_X11
Atom trap_xrandr = XInternAtom(dpy, "X11VNC_TRAP_XRANDR", True); Atom trap_xrandr = XInternAtom(dpy, "X11VNC_TRAP_XRANDR", True);
if (trap_xrandr != None) { if (trap_xrandr != None) {
if (! quiet) { if (! quiet) {
...@@ -5025,6 +5026,7 @@ int main(int argc, char* argv[]) { ...@@ -5025,6 +5026,7 @@ int main(int argc, char* argv[]) {
} }
xrandr = 1; xrandr = 1;
} }
#endif
} }
#ifdef MACOSX #ifdef MACOSX
......
...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0; ...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.10 lastmod: 2009-12-24"; char lastmod[] = "0.9.10 lastmod: 2009-12-27";
/* X display info */ /* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment