From 09f63f0395fe103fd1442b2b012b98f2cda2dcd3 Mon Sep 17 00:00:00 2001 From: runge Date: Wed, 18 Nov 2009 18:25:36 -0500 Subject: x11vnc: -findauth, -auth guess, & etc. --- x11vnc/tkx11vnc.h | 119 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 92 insertions(+), 27 deletions(-) (limited to 'x11vnc/tkx11vnc.h') diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index 8180fe2..54400a7 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -2732,6 +2732,7 @@ char gui_code[] = ""; "\n" "proc update_menu_vars {{query \"\"}} {\n" " global all_settings menu_var query_result_list\n" +" global x11vnc_icon_mode\n" "\n" " set debug [in_debug_mode]\n" "\n" @@ -2745,6 +2746,14 @@ char gui_code[] = ""; "\n" " foreach piece $query_result_list {\n" "#puts stderr \"UMV: $piece\"\n" +" if [regexp {icon_mode:0} $piece] {\n" +" set x11vnc_icon_mode 0\n" +" #puts stderr \"x11vnc_icon_mode: $x11vnc_icon_mode\"\n" +" }\n" +" if [regexp {icon_mode:1} $piece] {\n" +" set x11vnc_icon_mode 1\n" +" #puts stderr \"x11vnc_icon_mode: $x11vnc_icon_mode\"\n" +" }\n" " if {[regexp {^([^:][^:]*):(.*)$} $piece m0 item val]} {\n" " if {[info exists menu_var($item)]} {\n" " set old $menu_var($item)\n" @@ -4330,7 +4339,7 @@ char gui_code[] = ""; "}\n" "\n" "proc props_advanced {} {\n" -" global icon_mode icon_win props_win full_win\n" +" global icon_mode props_win full_win\n" " global props_advanced_first\n" "\n" " if ![info exists props_advanced_first] {\n" @@ -4348,6 +4357,7 @@ char gui_code[] = ""; " set w $full_win\n" " wm minsize $w [winfo width $w] [winfo height $w]\n" " }\n" +" push_new_value \"remote-cmd\" \"remote-cmd\" \"Q:clients\" 1\n" "}\n" "\n" "proc do_props {} {\n" @@ -4486,17 +4496,20 @@ char gui_code[] = ""; " }\n" " set props_buttons [list]\n" "\n" -" set w .props\n" -" catch {destroy $w}\n" -" toplevel $w\n" -" wm title $w \"x11vnc Properties\"\n" +" set wp .props\n" +" set w $wp\n" +" catch {destroy $wp}\n" +" toplevel $wp\n" +" wm title $wp \"x11vnc Properties\"\n" +" frame $w.lf\n" +" set w $w.lf\n" " set b1 \"$w.buttons1\"\n" " frame $b1\n" -" button $b1.ok -text OK -command \"if {\\[props_apply\\]} {destroy $w}\" -font $bfont\n" -" button $b1.cancel -text Cancel -command \"destroy $w\" -font $bfont\n" +" button $b1.ok -text OK -command \"if {\\[props_apply\\]} {destroy $wp}\" -font $bfont\n" +" button $b1.cancel -text Cancel -command \"destroy $wp\" -font $bfont\n" " button $b1.apply -text Apply -command \"props_apply\" -font $bfont\n" "\n" -" bind $w \"destroy $w\"\n" +" bind $w \"destroy $wp\"\n" "\n" " pack $b1.ok $b1.cancel $b1.apply -side left -expand 0\n" " lappend props_buttons $b1.apply $b1.cancel $b1.ok\n" @@ -4505,7 +4518,7 @@ char gui_code[] = ""; " frame $b2\n" "\n" " button $b2.advanced -text \" Advanced ... \" \\\n" -" -command \"destroy $w; props_advanced\" -font $bfont\n" +" -command \"destroy $wp; props_advanced\" -font $bfont\n" " if {! $icon_noadvanced} {\n" " lappend props_buttons $b2.advanced\n" " pack $b2.advanced -side left -expand 0\n" @@ -4527,6 +4540,17 @@ char gui_code[] = ""; " entry $pw.e -show \"*\" -textvariable props_passwd -font $bfont\n" " pack $pw.e -fill x -expand 1 -padx 1m -pady $pady -side top\n" "\n" +" global x11vnc_icon_mode\n" +" if {! $x11vnc_icon_mode} {\n" +" catch { $pw.e configure -state disabled}\n" +" if {! $have_labelframes} {\n" +" catch { $pw.l configure -state disabled}\n" +" }\n" +" } else {\n" +" lappend props_buttons $pw.e\n" +" }\n" +"\n" +"\n" " set vp \"$w.viewpw\"\n" " if {$have_labelframes} {\n" " labelframe $vp -text \"ViewOnly Password\" -font $bfont\n" @@ -4539,8 +4563,14 @@ char gui_code[] = ""; " entry $vp.e -show \"*\" -textvariable props_viewpasswd -font $bfont\n" " pack $vp.e -fill x -expand 1 -padx 1m -pady $pady -side top\n" "\n" -"\n" -" lappend props_buttons $vp.e\n" +" if {! $x11vnc_icon_mode} {\n" +" catch { $vp.e configure -state disabled}\n" +" if {! $have_labelframes} {\n" +" catch { $vp.l configure -state disabled}\n" +" }\n" +" } else {\n" +" lappend props_buttons $vp.e\n" +" }\n" "\n" " if {! $icon_mode_at_startup} {\n" " $vp.e configure -state disabled\n" @@ -4553,8 +4583,6 @@ char gui_code[] = ""; " catch {$pw configure -foreground grey60}\n" " }\n" "\n" -" lappend props_buttons $pw.e\n" -"\n" " set sb \"$w.solid\"\n" " frame $sb\n" " checkbutton $sb.button -text \"Solid Background Color\" \\\n" @@ -4615,17 +4643,21 @@ char gui_code[] = ""; " set show_props_instructions 1\n" " }\n" "\n" -" wm withdraw $w\n" +" wm withdraw .props\n" +"\n" +" set wl $w\n" +"\n" +" pack $wl -side left\n" "\n" " if {$msg != \"\"} {\n" " set tw [textwidth $msg]\n" " set th [textheight $msg]\n" " set th [expr $th - 1]\n" -" set ms \"$w.msg\"\n" +" set ms \".props.msg\"\n" " text $ms -font $ffont -relief ridge -width $tw -height $th\n" " $ms insert 1.0 $msg\n" "\n" -" set si \"$w.instructions\"\n" +" set si \"$wl.instructions\"\n" " frame $si\n" " checkbutton $si.button -text \"Show Instructions\" \\\n" " -variable show_props_instructions -anchor w -font $bfont \\\n" @@ -4635,15 +4667,17 @@ char gui_code[] = ""; " pack $si -side bottom -fill x -pady 0m -padx $px\n" "\n" " if {$show_props_instructions} {\n" -" pack $ms -side bottom -fill x -pady $pady -padx $px\n" +" pack $ms -side left -fill both\n" " }\n" "\n" " update\n" " }\n" "\n" +"\n" " lappend props_buttons $ac.button $cf.button $vo.button $sh.button $zc.button $jv.button $sb.button\n" "\n" " \n" +" set w .props\n" " update\n" " wm resizable $w 1 0\n" " center_win $w\n" @@ -4658,7 +4692,7 @@ char gui_code[] = ""; "proc toggle_instructions {ms pady px} {\n" " global show_props_instructions\n" " if {$show_props_instructions} {\n" -" pack $ms -side bottom -fill x -pady $pady -padx $px\n" +" pack $ms -side left -fill both\n" " } else {\n" " pack forget $ms\n" " }\n" @@ -4909,6 +4943,13 @@ char gui_code[] = ""; " if {$client_balloon == \"\"} {\n" " set client_balloon $noinfo\n" " }\n" +" if {! [info exists icon_win]} {\n" +" return\n" +" } elseif {$icon_win == \"\"} {\n" +" return\n" +" } elseif {! [winfo exists $icon_win]} {\n" +" return\n" +" }\n" "\n" " set x [expr [winfo rootx $icon_win] + ([winfo width $icon_win]/2)]\n" " set y [expr [winfo rooty $icon_win] + [winfo height $icon_win] + 4]\n" @@ -4957,10 +4998,11 @@ char gui_code[] = ""; "proc icon_win_cfg {clients} {\n" " global icon_win client_tail client_sock client_info_read\n" "\n" -" if {![info exists icon_win]} {\n" +" if {! [info exists icon_win]} {\n" " return\n" -" }\n" -" if {$icon_win == \"\"} {\n" +" } elseif {$icon_win == \"\"} {\n" +" return\n" +" } elseif {! [winfo exists $icon_win]} {\n" " return\n" " }\n" " if {$clients > 0} {\n" @@ -5120,6 +5162,14 @@ char gui_code[] = ""; " global icon_win\n" "\n" " set lab [get_icon_label]\n" +"\n" +" if {! [info exists icon_win]} {\n" +" return\n" +" } elseif {$icon_win == \"\"} {\n" +" return\n" +" } elseif {! [winfo exists $icon_win]} {\n" +" return\n" +" }\n" " \n" " if {[info exists icon_win]} {\n" " $icon_win configure -text $lab\n" @@ -6287,6 +6337,18 @@ char gui_code[] = ""; " if {$db} {puts stderr \"run_remote_cmd_via_sock: \\\"$res\\\"\"}\n" " set res [string trim $res]\n" "\n" +" if [regexp {=clients:} $res] {\n" +" regsub {^.*=clients:} $res \"\" cres\n" +" regsub {,aro=.*$} $cres \"\" cres\n" +" regsub {,ans=.*$} $cres \"\" cres\n" +" if {$cres == \"none\"} {\n" +" set cres \"\"\n" +" }\n" +" update_clients_menu $cres\n" +" set client_str $cres\n" +" set_client_balloon $cres\n" +" }\n" +"\n" " if [regexp {^clients:} $res] {\n" " regsub {^clients:} $res \"\" tmp\n" " if {$tmp == \"none\"} {\n" @@ -6674,7 +6736,6 @@ char gui_code[] = ""; "}\n" "\n" "proc setup_tray_embed {} {\n" -" global icon_win\n" " update\n" " set w [winfo width .]\n" " set h [winfo height .]\n" @@ -6765,7 +6826,6 @@ char gui_code[] = ""; "}\n" "\n" "proc undo_tray_embed {} {\n" -" global icon_win\n" " set wid [winfo id .] \n" " push_new_value \"remote-cmd\" \"remote-cmd\" \"trayunembed:$wid\" 0\n" "}\n" @@ -6793,7 +6853,7 @@ char gui_code[] = ""; "global connected_to_x11vnc\n" "global cache_all_query_vars\n" "global last_query_all_time query_all_freq client_tail client_sock client_info_read\n" -"global icon_mode icon_mode_at_startup\n" +"global icon_mode icon_mode_at_startup x11vnc_icon_mode\n" "global tray_embed tray_running icon_setpasswd icon_embed_id\n" "global icon_noadvanced icon_minimal\n" "global make_gui_count text_area_str\n" @@ -7063,6 +7123,7 @@ char gui_code[] = ""; "}\n" "\n" "set icon_mode 0\n" +"set x11vnc_icon_mode 0\n" "set tray_embed 0\n" "set tray_running 0\n" "\n" @@ -7170,11 +7231,11 @@ char gui_code[] = ""; " set do_props_msg \"\"\n" " if {$icon_setpasswd} {\n" " set m \"\\n\"\n" -" set m \" Note the x11vnc icon in the system tray \\n\" \n" +" set m \"${m} Note the x11vnc icon in the system tray.\\n\" \n" " set m \"${m} This panel is its 'Properties' dialog.\\n\" \n" " set m \"${m}\\n\" \n" " set m \"${m} To specify a Session Password and to\\n\" \n" -" set m \"${m} allow VNC clients to connect, follow\\n\" \n" +" set m \"${m} allow VNC viewers to connect, follow\\n\" \n" " set m \"${m} these steps:\\n\" \n" " set m \"${m}\\n\" \n" " set m \"${m} Enter a passwd in the Password field\\n\" \n" @@ -7184,9 +7245,12 @@ char gui_code[] = ""; " set m \"${m} Set 'Accept Connections' and then Press \\n\" \n" " set m \"${m} 'Apply' to allow incoming connections.\\n\" \n" " set m \"${m}\\n\" \n" +" set m \"${m} No Viewer can connect until you do this.\\n\" \n" +" set m \"${m}\\n\" \n" " set m \"${m} The passwords are only for this x11vnc\\n\" \n" " set m \"${m} session and are not saved. Run x11vnc\\n\" \n" -" set m \"${m} manually for more control.\\n\" \n" +" set m \"${m} manually for more control (e.g. -rfbauth \\n\" \n" +" set m \"${m} for a saved password.)\\n\" \n" " set m \"${m}\\n\" \n" " set m \"${m} See 'Help' for details on each option.\\n\" \n" "\n" @@ -7248,6 +7312,7 @@ char gui_code[] = ""; " dtime G\n" " old_balloon\n" " check_setpasswd\n" +" push_new_value \"remote-cmd\" \"remote-cmd\" \"Q:clients\" 1\n" "} else {\n" " make_gui \"full\"\n" " dtime G\n" -- cgit v1.2.3