diff options
-rw-r--r-- | x11vnc/ChangeLog | 5 | ||||
-rw-r--r-- | x11vnc/README | 92 | ||||
-rw-r--r-- | x11vnc/allowed_input_t.h | 1 | ||||
-rw-r--r-- | x11vnc/connections.c | 2 | ||||
-rw-r--r-- | x11vnc/help.c | 55 | ||||
-rw-r--r-- | x11vnc/keyboard.c | 20 | ||||
-rw-r--r-- | x11vnc/keyboard.h | 2 | ||||
-rw-r--r-- | x11vnc/remote.c | 42 | ||||
-rw-r--r-- | x11vnc/screen.c | 1 | ||||
-rwxr-xr-x | x11vnc/tkx11vnc | 85 | ||||
-rw-r--r-- | x11vnc/tkx11vnc.h | 85 | ||||
-rw-r--r-- | x11vnc/unixpw.c | 1 | ||||
-rw-r--r-- | x11vnc/user.c | 9 | ||||
-rw-r--r-- | x11vnc/x11vnc.1 | 60 | ||||
-rw-r--r-- | x11vnc/x11vnc_defs.c | 2 | ||||
-rw-r--r-- | x11vnc/xevents.c | 12 |
16 files changed, 336 insertions, 138 deletions
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog index b3084e4..19c5225 100644 --- a/x11vnc/ChangeLog +++ b/x11vnc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-16 Karl Runge <[email protected]> + * x11vnc: add Files mode to user controlled input. more + ultra/tight filexfer tweaks. rfbversion remote control. + noncache/nc unixpw user opt. + 2007-02-15 Karl Runge <[email protected]> * x11vnc: tightvnc filetransfer off by default. avahi fixes. FINDCREATEDISPLAY geometry. -noultraext. diff --git a/x11vnc/README b/x11vnc/README index 409bd77..6b2d02f 100644 --- a/x11vnc/README +++ b/x11vnc/README @@ -1,5 +1,5 @@ -x11vnc README file Date: Thu Feb 15 21:21:56 EST 2007 +x11vnc README file Date: Fri Feb 16 13:40:55 EST 2007 The following information is taken from these URLs: @@ -6574,18 +6574,37 @@ ateway and not a broadcaster?) As of Oct/2005 and May/2006 x11vnc enables, respectively, the TightVNC and UltraVNC file transfer implementations that were added to libvncserver. This currently works with TightVNC and UltraVNC viewers - (and Windows viewers only support filetransfer it appears). + (and Windows viewers only support filetransfer it appears... but they + do work to some degree under Wine on Linux). - TightVNC file transfer is on by default, if you want to disable it use - the [756]-nofilexfer option. UltraVNC file transfer is currently off - by default, to enable it use something like "-rfbversion 3.6 - -permitfiletransfer" + TightVNC file transfer is off by default, if you want to enable it use + the [756]-nofilexfer option. + + UltraVNC file transfer is off by default, to enable it use something + like "-rfbversion 3.6 -permitfiletransfer" options (UltraVNC incorrectly uses the RFB protocol version to determine if its features are available, so x11vnc has to pretend to be version 3.6). As of Sep/2006 "-ultrafilexfer" is an alias for these two options. Note that running as RFB version 3.6 may confuse other VNC Viewers. + Sadly you cannot do both -tightfilexfer and -ultrafilexfer at the same + time because the latter requires setting the version to 3.6 and + tightvnc will not do filetransfer when it sees that version number. + + Also, because of the way the LibVNCServer TightVNC file transfer is + implemented, you cannot do Tightvnc file transfer in -unixpw mode. + UltraVNC file transfer does work, however. + + The UltraVNC and TightVNC settings can be toggled on and off inside + the gui or by -R remote control. However for TightVNC the changed + setting only applies for NEW clients, current clients retain their + TightVNC file transfer ability. For UltraVNC it works better, however + if an UltraVNC client has initiated a file transfer dialog it will + remain in effect until the dialog is closed. If you want to switch + between UltraVNC and TightVNC file transfer in the gui or by remote + control you will probably be foiled by the "-rfbversion 3.6" issue. + Q-110: Which UltraVNC extensions are supported? @@ -10008,7 +10027,7 @@ x11vnc: a VNC server for real X displays Here are all of x11vnc command line options: % x11vnc -opts (see below for -help long descriptions) -x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-15 +x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-16 x11vnc options: -display disp -auth file -N @@ -10121,7 +10140,7 @@ libvncserver-tight-extension options: % x11vnc -help -x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-15 +x11vnc: allow VNC connections to real X11 displays. 0.8.5 lastmod: 2007-02-16 (type "x11vnc -opts" to just list the options.) @@ -10466,7 +10485,7 @@ Options: Note that sadly you cannot do both -tightfilexfer and -ultrafilexfer at the same time because the latter requires setting the version to 3.6 and tightvnc will - not do filetransfer at that version number. + not do filetransfer when it sees that version number. -http Instead of using -httpdir (see below) to specify where the Java vncviewer applet is, have x11vnc try @@ -10550,13 +10569,14 @@ Options: -input string Fine tuning of allowed user input. If "string" does not contain a comma "," the tuning applies only to - normal clients. Otherwise the part before "," is for - normal clients and the part after for view-only clients. - "K" is for Keystroke input, "M" for Mouse-motion - input, "B" for Button-click input, and "C" is for - Clipboard input. Their presence in the string enables + normal clients. Otherwise the part before "," is + for normal clients and the part after for view-only + clients. "K" is for Keystroke input, "M" for + Mouse-motion input, "B" for Button-click input, "C" + is for Clipboard input, and "F" is for File transfer + (ultravnc only). Their presence in the string enables that type of input. E.g. "-input M" means normal - users can only move the mouse and "-input KMBC,M" + users can only move the mouse and "-input KMBCF,M" lets normal users do anything and enables view-only users to move the mouse. This option is ignored when a global -viewonly is in effect (all input is discarded @@ -10886,10 +10906,11 @@ Options: place a colon at the end of his username and supply a few options: scale=, scale_cursor= (or sc=), solid (or so), id=, clear_mods (or cm), clear_keys (or ck), - repeat, speeds= (or sp=), readtimeout= (or rd=), or - rotate= (or ro=) separated by commas if there is more - than one. After the user logs in successfully, these - options will be applied to the VNC screen. For example, + repeat, speeds= (or sp=), readtimeout= (or rd=), + rotate= (or ro=), or noncache (or nc) separated by + commas if there is more than one. After the user logs + in successfully, these options will be applied to the + VNC screen. For example, login: fred:scale=3/4,sc=1,repeat Password: ... @@ -13487,10 +13508,11 @@ n timeout:n reset -timeout to n, if there are currently no clients, exit unless one connects in the next n secs. - tightfilexfer enable filetransfer for new client -s. - notightfilexfer disable filetransfer for new client -s. + tightfilexfer enable filetransfer for NEW clients. + notightfilexfer disable filetransfer for NEW clients. + ultrafilexfer enable filetransfer for clients. + noultrafilexfer disable filetransfer for clients. + rfbversion:n.m set -rfbversion for new clients. http enable http client connections. nohttp disable http client connections. deny deny any new connections, same as "lock" @@ -13800,7 +13822,8 @@ s. nooverlay_yescursor overlay_nocursor 8to24 no8to24 8to24_opts 24to32 no24to32 visual scale scale_cursor viewonly noviewonly shared noshared forever noforever - once timeout filexfer nofilexfer deny lock nodeny unlock + once timeout tightfilexfer notightfilexfer ultrafilexfer + noultrafilexfer rfbversion deny lock nodeny unlock avahi mdns noavahi nomdns connect allowonce allow localhost nolocalhost listen lookup nolookup accept afteraccept gone shm noshm flipbyteorder noflipbyteorder @@ -13829,16 +13852,17 @@ s. nowireframe nowf wireframelocal wfl nowireframelocal nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys scr_term scr_keyrepeat - scr_parms scrollcopyrect scr noscrollcopyrect noscr - fixscreen noxrecord xrecord reset_record pointer_mode pm - input_skip allinput noallinput input grabkbd nograbkbd - grabptr nograbptr grabalways nograbalways client_input - ssltimeout speeds wmdt debug_pointer dp nodebug_pointer - nodp debug_keyboard dk nodebug_keyboard nodk deferupdate - defer wait_ui wait_bog nowait_bog slow_fb wait - readtimeout nap nonap sb screen_blank fbpm nofbpm dpms - nodpms clientdpms noclientdpms forcedpms noforcedpms - noserverdpms serverdpms fs gaps grow fuzz snapfb + scr_parms scrollcopyrect scr noscrollcopyrect + noscr fixscreen noxrecord xrecord reset_record + pointer_mode pm input_skip allinput noallinput input + grabkbd nograbkbd grabptr nograbptr grabalways + nograbalways client_input ssltimeout speeds wmdt + debug_pointer dp nodebug_pointer nodp debug_keyboard + dk nodebug_keyboard nodk deferupdate defer wait_ui + wait_bog nowait_bog slow_fb wait readtimeout nap nonap + sb screen_blank fbpm nofbpm dpms nodpms clientdpms + noclientdpms forcedpms noforcedpms noserverdpms + serverdpms noultraext ultraext fs gaps grow fuzz snapfb nosnapfb rawfb uinput_accel uinput_thresh uinput_reset uinput_always progressive rfbport http nohttp httpport httpdir enablehttpproxy noenablehttpproxy alwaysshared diff --git a/x11vnc/allowed_input_t.h b/x11vnc/allowed_input_t.h index bbdb841..7ef1a87 100644 --- a/x11vnc/allowed_input_t.h +++ b/x11vnc/allowed_input_t.h @@ -8,6 +8,7 @@ typedef struct allowed_input { int motion; int button; int clipboard; + int files; } allowed_input_t; #endif /* _X11VNC_ALLOWED_INPUT_T_H */ diff --git a/x11vnc/connections.c b/x11vnc/connections.c index ba6e3ac..4640029 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -300,7 +300,7 @@ void set_client_input(char *str) { } *p = '\0'; p++; - val = short_kmbc(p); + val = short_kmbcf(p); cl_list = client_match(str); diff --git a/x11vnc/help.c b/x11vnc/help.c index 0d9f2fe..6f9b23b 100644 --- a/x11vnc/help.c +++ b/x11vnc/help.c @@ -363,7 +363,7 @@ void print_help(int mode) { " Note that sadly you cannot do both -tightfilexfer and\n" " -ultrafilexfer at the same time because the latter\n" " requires setting the version to 3.6 and tightvnc will\n" -" not do filetransfer at that version number.\n" +" not do filetransfer when it sees that version number.\n" "\n" "-http Instead of using -httpdir (see below) to specify\n" " where the Java vncviewer applet is, have x11vnc try\n" @@ -449,13 +449,14 @@ void print_help(int mode) { "\n" "-input string Fine tuning of allowed user input. If \"string\" does\n" " not contain a comma \",\" the tuning applies only to\n" -" normal clients. Otherwise the part before \",\" is for\n" -" normal clients and the part after for view-only clients.\n" -" \"K\" is for Keystroke input, \"M\" for Mouse-motion\n" -" input, \"B\" for Button-click input, and \"C\" is for\n" -" Clipboard input. Their presence in the string enables\n" +" normal clients. Otherwise the part before \",\" is\n" +" for normal clients and the part after for view-only\n" +" clients. \"K\" is for Keystroke input, \"M\" for\n" +" Mouse-motion input, \"B\" for Button-click input, \"C\"\n" +" is for Clipboard input, and \"F\" is for File transfer\n" +" (ultravnc only). Their presence in the string enables\n" " that type of input. E.g. \"-input M\" means normal\n" -" users can only move the mouse and \"-input KMBC,M\"\n" +" users can only move the mouse and \"-input KMBCF,M\"\n" " lets normal users do anything and enables view-only\n" " users to move the mouse. This option is ignored when\n" " a global -viewonly is in effect (all input is discarded\n" @@ -788,10 +789,11 @@ void print_help(int mode) { " place a colon at the end of his username and supply\n" " a few options: scale=, scale_cursor= (or sc=), solid\n" " (or so), id=, clear_mods (or cm), clear_keys (or ck),\n" -" repeat, speeds= (or sp=), readtimeout= (or rd=), or\n" -" rotate= (or ro=) separated by commas if there is more\n" -" than one. After the user logs in successfully, these\n" -" options will be applied to the VNC screen. For example,\n" +" repeat, speeds= (or sp=), readtimeout= (or rd=),\n" +" rotate= (or ro=), or noncache (or nc) separated by\n" +" commas if there is more than one. After the user logs\n" +" in successfully, these options will be applied to the\n" +" VNC screen. For example,\n" "\n" " login: fred:scale=3/4,sc=1,repeat\n" " Password: ...\n" @@ -3401,8 +3403,11 @@ void print_help(int mode) { " timeout:n reset -timeout to n, if there are\n" " currently no clients, exit unless one\n" " connects in the next n secs.\n" -" tightfilexfer enable filetransfer for new clients.\n" -" notightfilexfer disable filetransfer for new clients.\n" +" tightfilexfer enable filetransfer for NEW clients.\n" +" notightfilexfer disable filetransfer for NEW clients.\n" +" ultrafilexfer enable filetransfer for clients.\n" +" noultrafilexfer disable filetransfer for clients.\n" +" rfbversion:n.m set -rfbversion for new clients.\n" /* access */ " http enable http client connections.\n" " nohttp disable http client connections.\n" @@ -3717,7 +3722,8 @@ void print_help(int mode) { " nooverlay_yescursor overlay_nocursor 8to24 no8to24\n" " 8to24_opts 24to32 no24to32 visual scale scale_cursor\n" " viewonly noviewonly shared noshared forever noforever\n" -" once timeout filexfer nofilexfer deny lock nodeny unlock\n" +" once timeout tightfilexfer notightfilexfer ultrafilexfer\n" +" noultrafilexfer rfbversion deny lock nodeny unlock\n" " avahi mdns noavahi nomdns connect allowonce allow\n" " localhost nolocalhost listen lookup nolookup accept\n" " afteraccept gone shm noshm flipbyteorder noflipbyteorder\n" @@ -3746,16 +3752,17 @@ void print_help(int mode) { " nowireframe nowf wireframelocal wfl nowireframelocal\n" " nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area\n" " scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n" -" scr_parms scrollcopyrect scr noscrollcopyrect noscr\n" -" fixscreen noxrecord xrecord reset_record pointer_mode pm\n" -" input_skip allinput noallinput input grabkbd nograbkbd\n" -" grabptr nograbptr grabalways nograbalways client_input\n" -" ssltimeout speeds wmdt debug_pointer dp nodebug_pointer\n" -" nodp debug_keyboard dk nodebug_keyboard nodk deferupdate\n" -" defer wait_ui wait_bog nowait_bog slow_fb wait\n" -" readtimeout nap nonap sb screen_blank fbpm nofbpm dpms\n" -" nodpms clientdpms noclientdpms forcedpms noforcedpms\n" -" noserverdpms serverdpms fs gaps grow fuzz snapfb\n" +" scr_parms scrollcopyrect scr noscrollcopyrect\n" +" noscr fixscreen noxrecord xrecord reset_record\n" +" pointer_mode pm input_skip allinput noallinput input\n" +" grabkbd nograbkbd grabptr nograbptr grabalways\n" +" nograbalways client_input ssltimeout speeds wmdt\n" +" debug_pointer dp nodebug_pointer nodp debug_keyboard\n" +" dk nodebug_keyboard nodk deferupdate defer wait_ui\n" +" wait_bog nowait_bog slow_fb wait readtimeout nap nonap\n" +" sb screen_blank fbpm nofbpm dpms nodpms clientdpms\n" +" noclientdpms forcedpms noforcedpms noserverdpms\n" +" serverdpms noultraext ultraext fs gaps grow fuzz snapfb\n" " nosnapfb rawfb uinput_accel uinput_thresh uinput_reset\n" " uinput_always progressive rfbport http nohttp httpport\n" " httpdir enablehttpproxy noenablehttpproxy alwaysshared\n" diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c index 7f3793a..c7eaa97 100644 --- a/x11vnc/keyboard.c +++ b/x11vnc/keyboard.c @@ -30,7 +30,7 @@ void delete_added_keycodes(int bequiet); void initialize_remap(char *infile); int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new); void switch_to_xkb_if_better(void); -char *short_kmbc(char *str); +char *short_kmbcf(char *str); void initialize_allowed_input(void); void initialize_modtweak(void); void initialize_keyboard_and_pointer(void); @@ -2121,8 +2121,8 @@ if (sym >> 8 == 0) { \ } #endif -char *short_kmbc(char *str) { - int i, saw_k = 0, saw_m = 0, saw_b = 0, saw_c = 0, n = 10; +char *short_kmbcf(char *str) { + int i, saw_k = 0, saw_m = 0, saw_b = 0, saw_c = 0, saw_f = 0, n = 10; char *p, tmp[10]; for (i=0; i<n; i++) { @@ -2144,6 +2144,9 @@ char *short_kmbc(char *str) { } else if ((*p == 'C' || *p == 'c') && !saw_c) { tmp[i++] = 'C'; saw_c = 1; + } else if ((*p == 'F' || *p == 'f') && !saw_f) { + tmp[i++] = 'F'; + saw_f = 1; } p++; } @@ -2163,7 +2166,7 @@ void initialize_allowed_input(void) { } if (! allowed_input_str) { - allowed_input_normal = strdup("KMBC"); + allowed_input_normal = strdup("KMBCF"); allowed_input_view_only = strdup(""); } else { char *p, *str = strdup(allowed_input_str); @@ -2180,11 +2183,11 @@ void initialize_allowed_input(void) { } /* shorten them */ - str = short_kmbc(allowed_input_normal); + str = short_kmbcf(allowed_input_normal); free(allowed_input_normal); allowed_input_normal = str; - str = short_kmbc(allowed_input_view_only); + str = short_kmbcf(allowed_input_view_only); free(allowed_input_view_only); allowed_input_view_only = str; @@ -2507,6 +2510,7 @@ void get_allowed_input(rfbClientPtr client, allowed_input_t *input) { input->motion = 0; input->button = 0; input->clipboard = 0; + input->files = 0; if (! client) { return; @@ -2530,7 +2534,7 @@ void get_allowed_input(rfbClientPtr client, allowed_input_t *input) { if (allowed_input_normal) { str = allowed_input_normal; } else { - str = "KMBC"; + str = "KMBCF"; } } if (0) fprintf(stderr, "GAI: %s - %s\n", str, cd->input); @@ -2544,6 +2548,8 @@ if (0) fprintf(stderr, "GAI: %s - %s\n", str, cd->input); input->button = 1; } else if (*str == 'C') { input->clipboard = 1; + } else if (*str == 'F') { + input->files = 1; } str++; } diff --git a/x11vnc/keyboard.h b/x11vnc/keyboard.h index 5fd163e..0f31c82 100644 --- a/x11vnc/keyboard.h +++ b/x11vnc/keyboard.h @@ -17,7 +17,7 @@ extern void delete_added_keycodes(int bequiet); extern void initialize_remap(char *infile); extern int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new); extern void switch_to_xkb_if_better(void); -extern char *short_kmbc(char *str); +extern char *short_kmbcf(char *str); extern void initialize_allowed_input(void); extern void initialize_modtweak(void); extern void initialize_keyboard_and_pointer(void); diff --git a/x11vnc/remote.c b/x11vnc/remote.c index 19201cb..85d92d1 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -1272,7 +1272,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { } #ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER if (! tightfilexfer) { - rfbLog("remote_cmd: enabling -tightfilexfer for new clients.\n"); + rfbLog("remote_cmd: enabling -tightfilexfer for *NEW* clients.\n"); tightfilexfer = 1; rfbRegisterTightVNCFileTransferExtension(); } @@ -1287,7 +1287,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { } #ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER if (tightfilexfer) { - rfbLog("remote_cmd: disabling -tightfilexfer for new clients.\n"); + rfbLog("remote_cmd: disabling -tightfilexfer for *NEW* clients.\n"); tightfilexfer = 0; rfbUnregisterTightVNCFileTransferExtension(); } @@ -1295,6 +1295,44 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: -tightfilexfer not supported in this binary.\n"); #endif + } else if (!strcmp(p, "ultrafilexfer")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE); + goto qry; + } + if (! screen->permitFileTransfer) { + rfbLog("remote_cmd: enabling -ultrafilexfer for clients.\n"); + screen->permitFileTransfer = TRUE; + } + + } else if (!strcmp(p, "noultrafilexfer")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE); + goto qry; + } + if (screen->permitFileTransfer) { + rfbLog("remote_cmd: disabling -ultrafilexfer for clients.\n"); + screen->permitFileTransfer = FALSE; + } + + } else if (strstr(p, "rfbversion") == p) { + int maj, min; + COLON_CHECK("rfbversion:") + if (query) { + snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion); + goto qry; + } + p += strlen("rfbversion:"); + + if (sscanf(p, "%d.%d", &maj, &min) == 2) { + screen->protocolMajorVersion = maj; + screen->protocolMinorVersion = min; + rfbLog("remote_cmd: set rfbversion to: %d.%d\n", maj, min); + } else { + rfbLog("remote_cmd: invalid rfbversion: %s\n", p); + } + + } else if (!strcmp(p, "deny") || !strcmp(p, "lock")) { if (query) { snprintf(buf, bufn, "ans=%s:%d", p, deny_all); diff --git a/x11vnc/screen.c b/x11vnc/screen.c index 0c7e6f6..31cce52 100644 --- a/x11vnc/screen.c +++ b/x11vnc/screen.c @@ -2840,6 +2840,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { screen->setSingleWindow = set_single_window; screen->setServerInput = set_server_input; screen->setTextChat = set_text_chat; + screen->getFileTransferPermission = get_file_transfer_permitted; /* called from inetd, we need to treat stdio as our socket */ if (inetd && use_openssl) { diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc index b0e14de..eba179f 100755 --- a/x11vnc/tkx11vnc +++ b/x11vnc/tkx11vnc @@ -125,7 +125,8 @@ Clients vncconnect avahi -- D - filexfer + tightfilexfer + ultrafilexfer =GAL Java-applet:: =D http httpdir: @@ -258,6 +259,7 @@ Misc nofb =D nobell nolookup + rfbversion: bg =S loop =S loopbg @@ -579,6 +581,9 @@ Shows a menu of currently connected VNC clients on the x11vnc server. Allows you to find more information about them, change their input permissions, or disconnect them. +Note that the File transfer permission only applies to UltraVNC +file transfer, not TightVNC file transfer. + You will be prompted to confirm any disconnections. " @@ -592,9 +597,9 @@ You can choose to disconnect the client by clicking on the confirmation dialog to doublecheck. Alternatively, you can fine tune the VNC client's input permissions -by selecting any of the Keystrokes, Mouse-Motion, Button-Clicks, or -Clipboard-Input checkboxes and pressing \"OK\". This is like the -\"-input\" option but on a per-client basis. +by selecting any of the Keystrokes, Mouse-Motion, Button-Click, +Clipboard-Input, or Files checkboxes and pressing \"OK\". This is like +the \"-input\" option but on a per-client basis. To not change any aspects of the VNC client press \"Cancel\". " @@ -2023,7 +2028,7 @@ proc push_new_value {item name new {query 1}} { } proc set_kmbc_str {} { - global vl_bk vl_bm vl_bb vl_bc vr_bk vr_bm vr_bb vr_bc + global vl_bk vl_bm vl_bb vl_bc vl_bf vr_bk vr_bm vr_bb vr_bc vr_bf set str "" if {$vl_bk} { @@ -2038,7 +2043,10 @@ proc set_kmbc_str {} { if {$vl_bc} { append str "C" } - if {$vr_bk || $vr_bm || $vr_bb || $vr_bc} { + if {$vl_bf} { + append str "F" + } + if {$vr_bk || $vr_bm || $vr_bb || $vr_bc || $vr_bf} { append str "," } if {$vr_bk} { @@ -2053,16 +2061,19 @@ proc set_kmbc_str {} { if {$vr_bc} { append str "C" } + if {$vr_bf} { + append str "F" + } entry_insert $str } proc insert_input_window {} { global text_area cleanup_window global ffont menu_var - global vl_bk vl_bm vl_bb vl_bc vr_bk vr_bm vr_bb vr_bc + global vl_bk vl_bm vl_bb vl_bc vl_bf vr_bk vr_bm vr_bb vr_bc vr_bf append_text "\nUse these checkboxes to set the input permissions, " - append_text "or type in the \"KMBC...\"\n" + append_text "or type in the \"KMBCF...\"\n" append_text "-input string manually. Then press \"OK\" or \"Cancel\".\n" append_text "(note: an empty setting means use the default behavior, " append_text "see viewonly)\n\n" @@ -2079,18 +2090,22 @@ proc insert_input_window {} { checkbutton $fl.bm -font $ffont -anchor w -variable vl_bm \ -pady 1 -command set_kmbc_str -text "Mouse-Motion" checkbutton $fl.bb -font $ffont -anchor w -variable vl_bb \ - -pady 1 -command set_kmbc_str -text "Button-Clicks" + -pady 1 -command set_kmbc_str -text "Button-Click" checkbutton $fl.bc -font $ffont -anchor w -variable vl_bc \ -pady 1 -command set_kmbc_str -text "Clipboard-Input" + checkbutton $fl.bf -font $ffont -anchor w -variable vl_bf \ + -pady 1 -command set_kmbc_str -text "Files" label $fr.l -pady 1 -font $ffont -text "View-Only clients:" checkbutton $fr.bk -font $ffont -anchor w -variable vr_bk \ -pady 1 -command set_kmbc_str -text "Keystrokes" checkbutton $fr.bm -font $ffont -anchor w -variable vr_bm \ -pady 1 -command set_kmbc_str -text "Mouse-Motion" checkbutton $fr.bb -font $ffont -anchor w -variable vr_bb \ - -pady 1 -command set_kmbc_str -text "Button-Clicks" + -pady 1 -command set_kmbc_str -text "Button-Click" checkbutton $fr.bc -font $ffont -anchor w -variable vr_bc \ -pady 1 -command set_kmbc_str -text "Clipboard-Input" + checkbutton $fr.bf -font $ffont -anchor w -variable vr_bf \ + -pady 1 -command set_kmbc_str -text "Files" if {[info exists menu_var(input)]} { set input_str $menu_var(input) @@ -2108,10 +2123,13 @@ proc insert_input_window {} { set vl_bm 0 set vl_bb 0 set vl_bc 0 + set vl_bf 0 + set vr_bk 0 set vr_bm 0 set vr_bb 0 set vr_bc 0 + set vr_bf 0 if {[regexp -nocase {K} $normal]} { set vl_bk 1 @@ -2125,6 +2143,9 @@ proc insert_input_window {} { if {[regexp -nocase {C} $normal]} { set vl_bc 1 } + if {[regexp -nocase {F} $normal]} { + set vl_bf 1 + } if {[regexp -nocase {K} $viewonly]} { set vr_bk 1 } @@ -2137,9 +2158,12 @@ proc insert_input_window {} { if {[regexp -nocase {C} $viewonly]} { set vr_bc 1 } + if {[regexp -nocase {F} $viewonly]} { + set vr_bf 1 + } - pack $fl.l $fl.bk $fl.bm $fl.bb $fl.bc -side top -fill x - pack $fr.l $fr.bk $fr.bm $fr.bb $fr.bc -side top -fill x + pack $fl.l $fl.bk $fl.bm $fl.bb $fl.bc $fl.bf -side top -fill x + pack $fr.l $fr.bk $fr.bm $fr.bb $fr.bc $fr.bf -side top -fill x pack $fl $fr -side left update update idletasks @@ -2152,7 +2176,7 @@ proc insert_input_window {} { } proc set_ca_str {w} { - global ca_bk ca_bm ca_bb ca_bc ca_di + global ca_bk ca_bm ca_bb ca_bc ca_bf ca_di if {$ca_di} { entry_insert "disconnect" @@ -2160,6 +2184,7 @@ proc set_ca_str {w} { $w.bm configure -state disabled $w.bb configure -state disabled $w.bc configure -state disabled + $w.bf configure -state disabled return } @@ -2167,6 +2192,7 @@ proc set_ca_str {w} { $w.bm configure -state normal $w.bb configure -state normal $w.bc configure -state normal + $w.bf configure -state normal set str "" if {$ca_bk} { @@ -2181,13 +2207,16 @@ proc set_ca_str {w} { if {$ca_bc} { append str "C" } + if {$ca_bf} { + append str "F" + } entry_insert $str } proc insert_client_action_window {input} { global text_area cleanup_window global ffont menu_var - global ca_bk ca_bm ca_bb ca_bc ca_di + global ca_bk ca_bm ca_bb ca_bc ca_bf ca_di append_text "\nUse these checkboxes to set the input permissions " append_text "for this client\n-OR- whether to disconnect it instead. " @@ -2196,20 +2225,23 @@ proc insert_client_action_window {input} { catch {destroy $w} frame $w -bd 1 -relief ridge -cursor {top_left_arrow} checkbutton $w.di -pady 1 -font $ffont -anchor w -variable ca_di \ - -pady 1 -command "set_ca_str $w" -text "Disconnect " + -pady 1 -command "set_ca_str $w" -text "Disconnect " checkbutton $w.bk -font $ffont -anchor w -variable ca_bk \ -pady 1 -command "set_ca_str $w" -text "Keystrokes" checkbutton $w.bm -font $ffont -anchor w -variable ca_bm \ -pady 1 -command "set_ca_str $w" -text "Mouse-Motion" checkbutton $w.bb -font $ffont -anchor w -variable ca_bb \ - -pady 1 -command "set_ca_str $w" -text "Button-Clicks" + -pady 1 -command "set_ca_str $w" -text "Button-Click" checkbutton $w.bc -font $ffont -anchor w -variable ca_bc \ -pady 1 -command "set_ca_str $w" -text "Clipboard" + checkbutton $w.bf -font $ffont -anchor w -variable ca_bf \ + -pady 1 -command "set_ca_str $w" -text "Files" set ca_di 0 set ca_bk 0 set ca_bm 0 set ca_bb 0 + set ca_bf 0 set ca_bc 0 if {[regexp -nocase {K} $input]} { @@ -2224,8 +2256,11 @@ proc insert_client_action_window {input} { if {[regexp -nocase {C} $input]} { set ca_bc 1 } + if {[regexp -nocase {F} $input]} { + set ca_bf 1 + } - pack $w.di $w.bk $w.bm $w.bb $w.bc -side left + pack $w.di $w.bk $w.bm $w.bb $w.bc $w.bf -side left update update idletasks $text_area window create end -window $w @@ -3411,6 +3446,7 @@ proc client_dialog {client} { set sm 0 set sb 0 set sc 0 + set sf 0 if {[regexp -nocase {K} $input]} { append_text "Keystrokes" set sk 1 @@ -3426,7 +3462,7 @@ proc client_dialog {client} { if {$sk || $sm} { append_text ", " } - append_text "Button-Clicks" + append_text "Button-Click" set sb 1 } if {[regexp -nocase {C} $input]} { @@ -3436,7 +3472,14 @@ proc client_dialog {client} { append_text "Clipboard" set sm 1 } - if {! $sk && ! $sm && ! $sb && ! $sm} { + if {[regexp -nocase {F} $input]} { + if {$sk || $sm || $sb || $sf} { + append_text ", " + } + append_text "Files" + set sf 1 + } + if {! $sk && ! $sm && ! $sb && ! $sm && ! $sf} { append_text "None" } append_text "\n" @@ -3463,7 +3506,7 @@ proc client_dialog {client} { } elseif {[regexp -nocase {(disconnect|close)} $val]} { disconnect_dialog $client } else { - regsub -all -nocase {[^KMBC]} $val "" val + regsub -all -nocase {[^KMBCF]} $val "" val set item_bool(client_input) 0 push_new_value "client_input" "client_input" "$cid:$val" 0 } @@ -5207,7 +5250,7 @@ proc make_widgets {top} { # Make the top label - set label_width 80 + set label_width 84 if {$screen_width <= 400} { set label_width 64 } diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index e756f18..7b432d7 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -136,7 +136,8 @@ char gui_code[] = ""; " vncconnect\n" " avahi\n" " -- D\n" -" filexfer\n" +" tightfilexfer\n" +" ultrafilexfer\n" " =GAL Java-applet::\n" " =D http\n" " httpdir:\n" @@ -269,6 +270,7 @@ char gui_code[] = ""; " nofb\n" " =D nobell\n" " nolookup\n" +" rfbversion:\n" " bg\n" " =S loop\n" " =S loopbg\n" @@ -590,6 +592,9 @@ char gui_code[] = ""; "Allows you to find more information about them, change their input\n" "permissions, or disconnect them.\n" "\n" +"Note that the File transfer permission only applies to UltraVNC\n" +"file transfer, not TightVNC file transfer.\n" +"\n" "You will be prompted to confirm any disconnections.\n" "\"\n" "\n" @@ -603,9 +608,9 @@ char gui_code[] = ""; "confirmation dialog to doublecheck.\n" "\n" "Alternatively, you can fine tune the VNC client's input permissions\n" -"by selecting any of the Keystrokes, Mouse-Motion, Button-Clicks, or\n" -"Clipboard-Input checkboxes and pressing \\\"OK\\\". This is like the\n" -"\\\"-input\\\" option but on a per-client basis.\n" +"by selecting any of the Keystrokes, Mouse-Motion, Button-Click,\n" +"Clipboard-Input, or Files checkboxes and pressing \\\"OK\\\". This is like\n" +"the \\\"-input\\\" option but on a per-client basis.\n" "\n" "To not change any aspects of the VNC client press \\\"Cancel\\\".\n" "\"\n" @@ -2034,7 +2039,7 @@ char gui_code[] = ""; "}\n" "\n" "proc set_kmbc_str {} {\n" -" global vl_bk vl_bm vl_bb vl_bc vr_bk vr_bm vr_bb vr_bc\n" +" global vl_bk vl_bm vl_bb vl_bc vl_bf vr_bk vr_bm vr_bb vr_bc vr_bf\n" "\n" " set str \"\"\n" " if {$vl_bk} {\n" @@ -2049,7 +2054,10 @@ char gui_code[] = ""; " if {$vl_bc} {\n" " append str \"C\"\n" " }\n" -" if {$vr_bk || $vr_bm || $vr_bb || $vr_bc} {\n" +" if {$vl_bf} {\n" +" append str \"F\"\n" +" }\n" +" if {$vr_bk || $vr_bm || $vr_bb || $vr_bc || $vr_bf} {\n" " append str \",\"\n" " }\n" " if {$vr_bk} {\n" @@ -2064,16 +2072,19 @@ char gui_code[] = ""; " if {$vr_bc} {\n" " append str \"C\"\n" " }\n" +" if {$vr_bf} {\n" +" append str \"F\"\n" +" }\n" " entry_insert $str\n" "}\n" "\n" "proc insert_input_window {} {\n" " global text_area cleanup_window\n" " global ffont menu_var\n" -" global vl_bk vl_bm vl_bb vl_bc vr_bk vr_bm vr_bb vr_bc\n" +" global vl_bk vl_bm vl_bb vl_bc vl_bf vr_bk vr_bm vr_bb vr_bc vr_bf\n" "\n" " append_text \"\\nUse these checkboxes to set the input permissions, \"\n" -" append_text \"or type in the \\\"KMBC...\\\"\\n\"\n" +" append_text \"or type in the \\\"KMBCF...\\\"\\n\"\n" " append_text \"-input string manually. Then press \\\"OK\\\" or \\\"Cancel\\\".\\n\"\n" " append_text \"(note: an empty setting means use the default behavior, \"\n" " append_text \"see viewonly)\\n\\n\"\n" @@ -2090,18 +2101,22 @@ char gui_code[] = ""; " checkbutton $fl.bm -font $ffont -anchor w -variable vl_bm \\\n" " -pady 1 -command set_kmbc_str -text \"Mouse-Motion\" \n" " checkbutton $fl.bb -font $ffont -anchor w -variable vl_bb \\\n" -" -pady 1 -command set_kmbc_str -text \"Button-Clicks\"\n" +" -pady 1 -command set_kmbc_str -text \"Button-Click\"\n" " checkbutton $fl.bc -font $ffont -anchor w -variable vl_bc \\\n" " -pady 1 -command set_kmbc_str -text \"Clipboard-Input\"\n" +" checkbutton $fl.bf -font $ffont -anchor w -variable vl_bf \\\n" +" -pady 1 -command set_kmbc_str -text \"Files\"\n" " label $fr.l -pady 1 -font $ffont -text \"View-Only clients:\"\n" " checkbutton $fr.bk -font $ffont -anchor w -variable vr_bk \\\n" " -pady 1 -command set_kmbc_str -text \"Keystrokes\" \n" " checkbutton $fr.bm -font $ffont -anchor w -variable vr_bm \\\n" " -pady 1 -command set_kmbc_str -text \"Mouse-Motion\" \n" " checkbutton $fr.bb -font $ffont -anchor w -variable vr_bb \\\n" -" -pady 1 -command set_kmbc_str -text \"Button-Clicks\"\n" +" -pady 1 -command set_kmbc_str -text \"Button-Click\"\n" " checkbutton $fr.bc -font $ffont -anchor w -variable vr_bc \\\n" " -pady 1 -command set_kmbc_str -text \"Clipboard-Input\"\n" +" checkbutton $fr.bf -font $ffont -anchor w -variable vr_bf \\\n" +" -pady 1 -command set_kmbc_str -text \"Files\"\n" "\n" " if {[info exists menu_var(input)]} {\n" " set input_str $menu_var(input)\n" @@ -2119,10 +2134,13 @@ char gui_code[] = ""; " set vl_bm 0\n" " set vl_bb 0\n" " set vl_bc 0\n" +" set vl_bf 0\n" +"\n" " set vr_bk 0\n" " set vr_bm 0\n" " set vr_bb 0\n" " set vr_bc 0\n" +" set vr_bf 0\n" "\n" " if {[regexp -nocase {K} $normal]} {\n" " set vl_bk 1\n" @@ -2136,6 +2154,9 @@ char gui_code[] = ""; " if {[regexp -nocase {C} $normal]} {\n" " set vl_bc 1\n" " }\n" +" if {[regexp -nocase {F} $normal]} {\n" +" set vl_bf 1\n" +" }\n" " if {[regexp -nocase {K} $viewonly]} {\n" " set vr_bk 1\n" " }\n" @@ -2148,9 +2169,12 @@ char gui_code[] = ""; " if {[regexp -nocase {C} $viewonly]} {\n" " set vr_bc 1\n" " }\n" +" if {[regexp -nocase {F} $viewonly]} {\n" +" set vr_bf 1\n" +" }\n" "\n" -" pack $fl.l $fl.bk $fl.bm $fl.bb $fl.bc -side top -fill x\n" -" pack $fr.l $fr.bk $fr.bm $fr.bb $fr.bc -side top -fill x\n" +" pack $fl.l $fl.bk $fl.bm $fl.bb $fl.bc $fl.bf -side top -fill x\n" +" pack $fr.l $fr.bk $fr.bm $fr.bb $fr.bc $fr.bf -side top -fill x\n" " pack $fl $fr -side left\n" " update\n" " update idletasks\n" @@ -2163,7 +2187,7 @@ char gui_code[] = ""; "}\n" "\n" "proc set_ca_str {w} {\n" -" global ca_bk ca_bm ca_bb ca_bc ca_di\n" +" global ca_bk ca_bm ca_bb ca_bc ca_bf ca_di\n" "\n" " if {$ca_di} {\n" " entry_insert \"disconnect\"\n" @@ -2171,6 +2195,7 @@ char gui_code[] = ""; " $w.bm configure -state disabled\n" " $w.bb configure -state disabled\n" " $w.bc configure -state disabled\n" +" $w.bf configure -state disabled\n" " return\n" " }\n" "\n" @@ -2178,6 +2203,7 @@ char gui_code[] = ""; " $w.bm configure -state normal\n" " $w.bb configure -state normal\n" " $w.bc configure -state normal\n" +" $w.bf configure -state normal\n" "\n" " set str \"\"\n" " if {$ca_bk} {\n" @@ -2192,13 +2218,16 @@ char gui_code[] = ""; " if {$ca_bc} {\n" " append str \"C\"\n" " }\n" +" if {$ca_bf} {\n" +" append str \"F\"\n" +" }\n" " entry_insert $str\n" "}\n" "\n" "proc insert_client_action_window {input} {\n" " global text_area cleanup_window\n" " global ffont menu_var\n" -" global ca_bk ca_bm ca_bb ca_bc ca_di\n" +" global ca_bk ca_bm ca_bb ca_bc ca_bf ca_di\n" "\n" " append_text \"\\nUse these checkboxes to set the input permissions \"\n" " append_text \"for this client\\n-OR- whether to disconnect it instead. \"\n" @@ -2207,20 +2236,23 @@ char gui_code[] = ""; " catch {destroy $w}\n" " frame $w -bd 1 -relief ridge -cursor {top_left_arrow}\n" " checkbutton $w.di -pady 1 -font $ffont -anchor w -variable ca_di \\\n" -" -pady 1 -command \"set_ca_str $w\" -text \"Disconnect \" \n" +" -pady 1 -command \"set_ca_str $w\" -text \"Disconnect \" \n" " checkbutton $w.bk -font $ffont -anchor w -variable ca_bk \\\n" " -pady 1 -command \"set_ca_str $w\" -text \"Keystrokes\" \n" " checkbutton $w.bm -font $ffont -anchor w -variable ca_bm \\\n" " -pady 1 -command \"set_ca_str $w\" -text \"Mouse-Motion\" \n" " checkbutton $w.bb -font $ffont -anchor w -variable ca_bb \\\n" -" -pady 1 -command \"set_ca_str $w\" -text \"Button-Clicks\"\n" +" -pady 1 -command \"set_ca_str $w\" -text \"Button-Click\"\n" " checkbutton $w.bc -font $ffont -anchor w -variable ca_bc \\\n" " -pady 1 -command \"set_ca_str $w\" -text \"Clipboard\"\n" +" checkbutton $w.bf -font $ffont -anchor w -variable ca_bf \\\n" +" -pady 1 -command \"set_ca_str $w\" -text \"Files\"\n" "\n" " set ca_di 0\n" " set ca_bk 0\n" " set ca_bm 0\n" " set ca_bb 0\n" +" set ca_bf 0\n" " set ca_bc 0\n" "\n" " if {[regexp -nocase {K} $input]} {\n" @@ -2235,8 +2267,11 @@ char gui_code[] = ""; " if {[regexp -nocase {C} $input]} {\n" " set ca_bc 1\n" " }\n" +" if {[regexp -nocase {F} $input]} {\n" +" set ca_bf 1\n" +" }\n" "\n" -" pack $w.di $w.bk $w.bm $w.bb $w.bc -side left\n" +" pack $w.di $w.bk $w.bm $w.bb $w.bc $w.bf -side left\n" " update\n" " update idletasks\n" " $text_area window create end -window $w\n" @@ -3422,6 +3457,7 @@ char gui_code[] = ""; " set sm 0\n" " set sb 0\n" " set sc 0\n" +" set sf 0\n" " if {[regexp -nocase {K} $input]} {\n" " append_text \"Keystrokes\"\n" " set sk 1\n" @@ -3437,7 +3473,7 @@ char gui_code[] = ""; " if {$sk || $sm} {\n" " append_text \", \"\n" " }\n" -" append_text \"Button-Clicks\"\n" +" append_text \"Button-Click\"\n" " set sb 1\n" " }\n" " if {[regexp -nocase {C} $input]} {\n" @@ -3447,7 +3483,14 @@ char gui_code[] = ""; " append_text \"Clipboard\"\n" " set sm 1\n" " }\n" -" if {! $sk && ! $sm && ! $sb && ! $sm} {\n" +" if {[regexp -nocase {F} $input]} {\n" +" if {$sk || $sm || $sb || $sf} {\n" +" append_text \", \"\n" +" }\n" +" append_text \"Files\"\n" +" set sf 1\n" +" }\n" +" if {! $sk && ! $sm && ! $sb && ! $sm && ! $sf} {\n" " append_text \"None\"\n" " }\n" " append_text \"\\n\"\n" @@ -3474,7 +3517,7 @@ char gui_code[] = ""; " } elseif {[regexp -nocase {(disconnect|close)} $val]} {\n" " disconnect_dialog $client\n" " } else {\n" -" regsub -all -nocase {[^KMBC]} $val \"\" val\n" +" regsub -all -nocase {[^KMBCF]} $val \"\" val\n" " set item_bool(client_input) 0\n" " push_new_value \"client_input\" \"client_input\" \"$cid:$val\" 0\n" " }\n" @@ -5218,7 +5261,7 @@ char gui_code[] = ""; "\n" "\n" " # Make the top label\n" -" set label_width 80\n" +" set label_width 84\n" " if {$screen_width <= 400} {\n" " set label_width 64\n" " }\n" diff --git a/x11vnc/unixpw.c b/x11vnc/unixpw.c index cc4a208..d28cba2 100644 --- a/x11vnc/unixpw.c +++ b/x11vnc/unixpw.c @@ -1554,6 +1554,7 @@ void unixpw_accept(char *user) { unixpw_in_progress = 0; screen->permitFileTransfer = unixpw_file_xfer_save; if ((tightfilexfer = unixpw_tightvnc_xfer_save)) { + /* this doesn't work the current client is never registered */ #ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER rfbRegisterTightVNCFileTransferExtension(); #endif diff --git a/x11vnc/user.c b/x11vnc/user.c index aa06ace..ee82c1f 100644 --- a/x11vnc/user.c +++ b/x11vnc/user.c @@ -1113,6 +1113,7 @@ void user_supplied_opts(char *opts) { "speeds", "sp", "readtimeout", "rd", "rotate", "ro", "geometry", "geom", "ge", + "noncache", "nc", NULL }; @@ -1195,6 +1196,10 @@ void user_supplied_opts(char *opts) { } else if (!strcmp(p, "clear_keys") || !strcmp(p, "ck")) { clear_mods = 2; + } else if (!strcmp(p, "noncache") || + !strcmp(p, "nc")) { + ncache = 0; + ncache0 = 0; } else if (!strcmp(p, "repeat")) { no_autorepeat = 0; } else if (strstr(p, "speeds=") == p || @@ -1873,6 +1878,9 @@ fprintf(stderr, "\n");} if (chg_raw_fb) { raw_fb = NULL; } + + ncache = ncache_save; + if (unixpw && keep_unixpw_opts && keep_unixpw_opts[0] != '\0') { user_supplied_opts(keep_unixpw_opts); } @@ -1880,7 +1888,6 @@ fprintf(stderr, "\n");} free(create_cmd); } - ncache = ncache_save; return 1; } diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1 index 67ff2bc..1c709cf 100644 --- a/x11vnc/x11vnc.1 +++ b/x11vnc/x11vnc.1 @@ -2,7 +2,7 @@ .TH X11VNC "1" "February 2007" "x11vnc " "User Commands" .SH NAME x11vnc - allow VNC connections to real X11 displays - version: 0.8.5, lastmod: 2007-02-15 + version: 0.8.5, lastmod: 2007-02-16 .SH SYNOPSIS .B x11vnc [OPTION]... @@ -426,7 +426,7 @@ options: "\fB-rfbversion\fR \fI3.6 \fB-permitfiletransfer\fR"\fR Note that sadly you cannot do both \fB-tightfilexfer\fR and \fB-ultrafilexfer\fR at the same time because the latter requires setting the version to 3.6 and tightvnc will -not do filetransfer at that version number. +not do filetransfer when it sees that version number. .PP \fB-http\fR .IP @@ -541,13 +541,14 @@ lookups time out, etc. .IP Fine tuning of allowed user input. If \fIstring\fR does not contain a comma "," the tuning applies only to -normal clients. Otherwise the part before "," is for -normal clients and the part after for view-only clients. -"K" is for Keystroke input, "M" for Mouse-motion -input, "B" for Button-click input, and "C" is for -Clipboard input. Their presence in the string enables +normal clients. Otherwise the part before "," is +for normal clients and the part after for view-only +clients. "K" is for Keystroke input, "M" for +Mouse-motion input, "B" for Button-click input, "C" +is for Clipboard input, and "F" is for File transfer +(ultravnc only). Their presence in the string enables that type of input. E.g. "\fB-input\fR \fIM\fR" means normal -users can only move the mouse and "\fB-input\fR \fIKMBC,M\fR" +users can only move the mouse and "\fB-input\fR \fIKMBCF,M\fR" lets normal users do anything and enables view-only users to move the mouse. This option is ignored when a global \fB-viewonly\fR is in effect (all input is discarded @@ -935,10 +936,11 @@ Also in the case of \fB-unixpw,\fR the user logging in can place a colon at the end of his username and supply a few options: scale=, scale_cursor= (or sc=), solid (or so), id=, clear_mods (or cm), clear_keys (or ck), -repeat, speeds= (or sp=), readtimeout= (or rd=), or -rotate= (or ro=) separated by commas if there is more -than one. After the user logs in successfully, these -options will be applied to the VNC screen. For example, +repeat, speeds= (or sp=), readtimeout= (or rd=), +rotate= (or ro=), or noncache (or nc) separated by +commas if there is more than one. After the user logs +in successfully, these options will be applied to the +VNC screen. For example, .IP login: fred:scale=3/4,sc=1,repeat Password: ... @@ -4009,9 +4011,15 @@ timeout:n reset \fB-timeout\fR to n, if there are currently no clients, exit unless one connects in the next n secs. .IP -tightfilexfer enable filetransfer for new clients. +tightfilexfer enable filetransfer for NEW clients. .IP -notightfilexfer disable filetransfer for new clients. +notightfilexfer disable filetransfer for NEW clients. +.IP +ultrafilexfer enable filetransfer for clients. +.IP +noultrafilexfer disable filetransfer for clients. +.IP +rfbversion:n.m set \fB-rfbversion\fR for new clients. .IP http enable http client connections. .IP @@ -4568,7 +4576,8 @@ overlay_yescursor nooverlay_nocursor nooverlay_cursor nooverlay_yescursor overlay_nocursor 8to24 no8to24 8to24_opts 24to32 no24to32 visual scale scale_cursor viewonly noviewonly shared noshared forever noforever -once timeout filexfer nofilexfer deny lock nodeny unlock +once timeout tightfilexfer notightfilexfer ultrafilexfer +noultrafilexfer rfbversion deny lock nodeny unlock avahi mdns noavahi nomdns connect allowonce allow localhost nolocalhost listen lookup nolookup accept afteraccept gone shm noshm flipbyteorder noflipbyteorder @@ -4597,16 +4606,17 @@ ncache noncache ncache_size wireframe_mode wireframe wf nowireframe nowf wireframelocal wfl nowireframelocal nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys scr_term scr_keyrepeat -scr_parms scrollcopyrect scr noscrollcopyrect noscr -fixscreen noxrecord xrecord reset_record pointer_mode pm -input_skip allinput noallinput input grabkbd nograbkbd -grabptr nograbptr grabalways nograbalways client_input -ssltimeout speeds wmdt debug_pointer dp nodebug_pointer -nodp debug_keyboard dk nodebug_keyboard nodk deferupdate -defer wait_ui wait_bog nowait_bog slow_fb wait -readtimeout nap nonap sb screen_blank fbpm nofbpm dpms -nodpms clientdpms noclientdpms forcedpms noforcedpms -noserverdpms serverdpms fs gaps grow fuzz snapfb +scr_parms scrollcopyrect scr noscrollcopyrect +noscr fixscreen noxrecord xrecord reset_record +pointer_mode pm input_skip allinput noallinput input +grabkbd nograbkbd grabptr nograbptr grabalways +nograbalways client_input ssltimeout speeds wmdt +debug_pointer dp nodebug_pointer nodp debug_keyboard +dk nodebug_keyboard nodk deferupdate defer wait_ui +wait_bog nowait_bog slow_fb wait readtimeout nap nonap +sb screen_blank fbpm nofbpm dpms nodpms clientdpms +noclientdpms forcedpms noforcedpms noserverdpms +serverdpms noultraext ultraext fs gaps grow fuzz snapfb nosnapfb rawfb uinput_accel uinput_thresh uinput_reset uinput_always progressive rfbport http nohttp httpport httpdir enablehttpproxy noenablehttpproxy alwaysshared diff --git a/x11vnc/x11vnc_defs.c b/x11vnc/x11vnc_defs.c index 3ac323c..193b16d 100644 --- a/x11vnc/x11vnc_defs.c +++ b/x11vnc/x11vnc_defs.c @@ -15,7 +15,7 @@ int xtrap_base_event_type = 0; int xdamage_base_event_type = 0; /* date +'lastmod: %Y-%m-%d' */ -char lastmod[] = "0.8.5 lastmod: 2007-02-15"; +char lastmod[] = "0.8.5 lastmod: 2007-02-16"; /* X display info */ diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c index 2f2e02b..bf1aa8d 100644 --- a/x11vnc/xevents.c +++ b/x11vnc/xevents.c @@ -1401,10 +1401,22 @@ int get_keyboard_led_state_hook(rfbScreenInfoPtr s) { return 0; } int get_file_transfer_permitted(rfbClientPtr cl) { + allowed_input_t input; if (unixpw_in_progress) { rfbLog("get_file_transfer_permitted: unixpw_in_progress, skipping.\n"); return FALSE; } +if (0) fprintf(stderr, "get_file_transfer_permitted called\n"); + if (view_only) { + return FALSE; + } + if (cl->viewOnly) { + return FALSE; + } + get_allowed_input(cl, &input); + if (!input.files) { + return FALSE; + } return screen->permitFileTransfer; } |