summaryrefslogtreecommitdiffstats
path: root/x11vnc/tkx11vnc.h
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/tkx11vnc.h')
-rw-r--r--x11vnc/tkx11vnc.h160
1 files changed, 121 insertions, 39 deletions
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 146383d..ac0c574 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -269,6 +269,8 @@ char gui_code[] = "";
" =F rfbauth:\n"
" unixpw\n"
" unixpw_list:\n"
+" unixpw_nis\n"
+" unixpw_nis_list:\n"
" =0 storepasswd\n"
" =GAL LOFF\n"
" =GAL Misc-Perms::\n"
@@ -534,7 +536,11 @@ char gui_code[] = "";
"\"\n"
"\n"
" set helptext(unixpw_list) \"\n"
-"Set the -unixpw_list usernames list value.\n"
+"Set the -unixpw usernames list value.\n"
+"\"\n"
+"\n"
+" set helptext(unixpw_nis_list) \"\n"
+"Set the -unixpw_nis usernames list value.\n"
"\"\n"
"\n"
" set helptext(stunnel_pem) \"\n"
@@ -669,10 +675,12 @@ char gui_code[] = "";
" remote-control commands.\n"
"\n"
" - \\\"Password\\\" lets you set the session password viewers may use to gain full\n"
-" access to the display.\n"
+" access to the display. This will only work if x11vnc was started with \n"
+" the -gui icon or -gui tray mode.\n"
" \n"
" - \\\"ViewOnly Password\\\" lets you set the session password viewers may\n"
-" use to gain view only access to the display.\n"
+" use to gain view only access to the display. This will only work if\n"
+" x11vnc was started with the -gui icon or -gui tray mode.\n"
"\n"
"NOTE: These \\\"session\\\" passwords only last for the current x11vnc\n"
"session (they are not remembered, see the -storepasswd, -passwdfile,\n"
@@ -3228,25 +3236,36 @@ char gui_code[] = "";
" set ip \"\"\n"
" global menu_var text_area cleanup_window item_bool\n"
"\n"
-" append_text \"\\nClient info string: $client\\n\\n\"\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
-" $client m0 m1 m2 m3 m4 m5 m6 m7]} {\n"
-" # id:ip:port:user:hostname:input:loginvo\n"
-" set cid $m1\n"
-" set ip $m2\n"
+" #<id>:<ip>:<port>:<user>:<unix>:<hostname>:<input>:<loginview>:<time>\n"
+" append_text \"\\nClient info string:\\n - $client\\n\\n\"\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7 m8 m9]} {\n"
+" set cid $m1\n"
+" set ip $m2\n"
" set port $m3\n"
" set user $m4\n"
-" set host $m5\n"
+" set unix $m5\n"
+" set host $m6\n"
" regsub {\\..*$} $host \"\" host\n"
-" set input $m6\n"
-" set logvo $m7\n"
-" append_text \"Host: $host, Port: $port, User: $user, IP: $ip, Id: $cid\\n\"\n"
+" set input $m7\n"
+" set logvo $m8\n"
+" set ltime $m9\n"
+" append_text \"Host: $host, Port: $port, User: $user\"\n"
+" if {$unix != \"\" && $unix != \"none\"} {\n"
+" append_text \", Unix: $unix\"\n"
+" }\n"
+" append_text \", IP: $ip, Id: $cid\\n\"\n"
" append_text \" - originally logged in as: \"\n"
" if {$logvo == \"1\" } {\n"
-" append_text \"View-Only Client\\n\"\n"
+" append_text \"View-Only Client\"\n"
" } else {\n"
-" append_text \"Normal Client\\n\"\n"
+" append_text \"Normal Client\"\n"
+" }\n"
+" if {$ltime != \"\"} {\n"
+" set tim [clock format $ltime]\n"
+" append_text \", $tim\"\n"
" }\n"
+" append_text \"\\n\"\n"
" append_text \" - currently allowed input: \"\n"
" set sk 0\n"
" set sm 0\n"
@@ -3314,22 +3333,30 @@ char gui_code[] = "";
" set cid \"\"\n"
" set host \"\"\n"
" set msg \"\\n\"\n"
-" append msg \"*** Client info string: $client\\n\"\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*)$} $client m0 m1 m2 m3 m4 m5 m6]} {\n"
-" set cid $m1\n"
-" set ip $m2\n"
+" append msg \"*** Client info string:\\n $client\\n\"\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7 m8 m9]} {\n"
+" set cid $m1\n"
+" set ip $m2\n"
" set port $m3\n"
-" set host $m4\n"
+" set user $m4\n"
+" set unix $m5\n"
+" set host $m6\n"
" regsub {\\..*$} $host \"\" host\n"
-" set input $m5\n"
-" set logvo $m6\n"
-" append_text \"Host: $host, Port: $port, IP: $ip, Id: $cid\\n\"\n"
+" set input $m7\n"
+" set logvo $m8\n"
+" set ltime $m9\n"
+" append_text \"Host: $host, Port: $port, IP: $ip, User: $user\"\n"
+" if {$unix != \"\" && $unix != \"none\"} {\n"
+" append_text \", Unix: $unix\"\n"
+" }\n"
+" append_text \", Id: $cid\\n\"\n"
" }\n"
" if {$cid == \"\"} {\n"
" append_text \"Invalid client info string: $client\\n\"\n"
" return\n"
" }\n"
-" append msg \"*** To *DISCONNECT* this client press \\\"OK\\\", otherwise press \\\"Cancel\\\"\\n\"\n"
+" append msg \"*** To *DISCONNECT* this client press \\\"OK\\\" again, otherwise press \\\"Cancel\\\"\\n\"\n"
" bell\n"
" if {[warning_dialog $msg \"current\"]} {\n"
" push_new_value \"disconnect\" \"disconnect\" $cid 1\n"
@@ -3400,12 +3427,19 @@ char gui_code[] = "";
" }\n"
" regsub -all {[{}()~!$&*|;'\"`{}<>\\[\\]]} $client \"\" client\n"
" #'\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
-" $client m0 m1 m2 m3 m4 m5 m6 m7]} {\n"
-" # id:ip:port:user:hostname:input:loginvo\n"
-" set host $m5\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7 m8 m9]} {\n"
+" set id $m1\n"
+" set user $m4\n"
+" set unix $m5\n"
+" set host $m6\n"
" regsub {\\..*$} $host \"\" host\n"
-" set clabel \"$host $m1\"\n"
+" set clabel \"$host $id\"\n"
+" if {$unix != \"\" && $unix != \"none\"} {\n"
+" set clabel \"$unix@$clabel\"\n"
+" } elseif {$user != \"unknown-user\"} {\n"
+" set clabel \"$user@$clabel\"\n"
+" }\n"
" } else {\n"
" regsub {:.*$} $client \"\" clabel\n"
" }\n"
@@ -3954,6 +3988,7 @@ char gui_code[] = "";
" global menu_var unset_str\n"
" global have_labelframes ffont bfont\n"
" global props_buttons icon_noadvanced\n"
+" global icon_mode icon_mode_at_startup\n"
"\n"
" check_update_vars\n"
"\n"
@@ -4065,6 +4100,7 @@ char gui_code[] = "";
" entry $vp.e -show \"*\" -textvariable props_viewpasswd -font $bfont\n"
" pack $vp.e -fill x -expand 1 -padx 1m -pady 1m -side top\n"
"\n"
+"\n"
" lappend props_buttons $vp.e\n"
"\n"
" set pw \"$w.passwd\"\n"
@@ -4079,6 +4115,17 @@ char gui_code[] = "";
" entry $pw.e -show \"*\" -textvariable props_passwd -font $bfont\n"
" pack $pw.e -fill x -expand 1 -padx 1m -pady 1m -side top\n"
"\n"
+" if {! $icon_mode_at_startup} {\n"
+" $vp.e configure -state disabled\n"
+" catch {$vp.l configure -state disabled}\n"
+" catch {$vp configure -state disabled}\n"
+" catch {$vp configure -foreground grey60}\n"
+" $pw.e configure -state disabled\n"
+" catch {$pw.l configure -state disabled}\n"
+" catch {$pw configure -state disabled}\n"
+" catch {$pw configure -foreground grey60}\n"
+" }\n"
+"\n"
" lappend props_buttons $pw.e\n"
"\n"
" set sh \"$w.shared\"\n"
@@ -4199,7 +4246,8 @@ char gui_code[] = "";
" continue\n"
" }\n"
" if {[regexp {^([^:]*):(.*)$} $client mat id lab]} {\n"
-" $wd add command -label \"$lab\" \\\n"
+" set nid [expr \"$id + 0\"]\n"
+" $wd add command -label \"$nid $lab\" \\\n"
" -command \"do_disconnect_client $id\"\n"
" }\n"
" }\n"
@@ -4224,26 +4272,38 @@ char gui_code[] = "";
" \n"
" set client_balloon \"$vnc_display\"\n"
" set count 0\n"
+" regsub -all {^.*aro=clients:} $str \"\" str\n"
+" regsub -all {aro=.*$} $str \"\" str\n"
+" regsub -all {ans=.*$} $str \"\" str\n"
" foreach client [split $str \",\"] {\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
-" $client m0 m1 m2 m3 m4 m5 m6 m7]} {\n"
-" # id:ip:port:user:hostname:input:loginvo\n"
+" #puts \"client: $client\"\n"
+" if [regexp {^[ ]*$} $client] {\n"
+" continue\n"
+" }\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7 m8 m9]} {\n"
" set id $m1\n"
+" set nid [expr \"$m1 + 0\"]\n"
" set ip $m2\n"
" set port $m3\n"
" set user $m4\n"
+" set unix $m5\n"
" if {[string length $user] >= 24} {\n"
" # weird identd hash...\n"
" set user [string range $user 0 8]\n"
" set user \"${user}...\"\n"
" }\n"
-" set host $m5\n"
-" set input $m6\n"
-" set vo $m7\n"
+" if {$unix != \"\" && $unix != \"none\"} {\n"
+" set user $unix\n"
+" }\n"
+" set host $m6\n"
+" set input $m7\n"
+" set vo $m8\n"
+" set ltime $m9\n"
" if [regexp {^[ ]*$} $host] {\n"
" set host $ip\n"
" }\n"
-" set client_balloon \"${client_balloon}\\n$user\\@$host\"\n"
+" set client_balloon \"${client_balloon}\\n$nid $user\\@$host\"\n"
" if {$vo == \"1\"} {\n"
" set client_balloon \"${client_balloon} - view\"\n"
" lappend client_id_list \"$id:$user\\@$host - view\"\n"
@@ -5419,6 +5479,8 @@ char gui_code[] = "";
" set nitem \"xrandr\"\n"
" } elseif {$nitem == \"unixpw_list\"} {\n"
" set nitem \"unixpw\"\n"
+" } elseif {$nitem == \"unixpw_nis_list\"} {\n"
+" set nitem \"unixpw_nis\"\n"
" } elseif {$nitem == \"stunnel_pem\"} {\n"
" set nitem \"stunnel\"\n"
" } elseif {$nitem == \"wireframe_mode\"} {\n"
@@ -5881,12 +5943,16 @@ char gui_code[] = "";
"\n"
"proc restart_everything {gui_mode} {\n"
" global env gui_argv0 x11vnc_prog full_win\n"
+" global icon_mode_at_startup\n"
+" global tray_embed tray_running\n"
" if {$gui_mode == \"full\"} {\n"
" set env(X11VNC_ICON_MODE) 0\n"
" } elseif {$gui_mode == \"icon\"} {\n"
" set env(X11VNC_ICON_MODE) 1\n"
" } elseif {$gui_mode == \"tray\"} {\n"
-" if {![regexp -nocase {TRAY} $env(X11VNC_ICON_MODE)]} {\n"
+" if {$tray_running} {\n"
+" set env(X11VNC_ICON_MODE) \"RUNNING\"\n"
+" } else {\n"
" set env(X11VNC_ICON_MODE) \"TRAY\"\n"
" }\n"
" }\n"
@@ -5968,7 +6034,8 @@ char gui_code[] = "";
"global delay_sleep extra_sleep extra_sleep_split\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 tray_embed tray_running icon_setpasswd icon_embed_id\n"
+"global icon_mode icon_mode_at_startup\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"
"global gui_argv0 gui_start_mode\n"
@@ -6155,6 +6222,20 @@ char gui_code[] = "";
"set icon_mode 0\n"
"set tray_embed 0\n"
"set tray_running 0\n"
+"\n"
+"if {![info exists env(X11VNC_ICON_MODE_AT_STARTUP)]} {\n"
+" if {[info exists env(X11VNC_ICON_MODE)]} {\n"
+" if {$env(X11VNC_ICON_MODE) != 0} {\n"
+" set env(X11VNC_ICON_MODE_AT_STARTUP) 1\n"
+" } else {\n"
+" set env(X11VNC_ICON_MODE_AT_STARTUP) 0\n"
+" }\n"
+" } else {\n"
+" set env(X11VNC_ICON_MODE_AT_STARTUP) 0\n"
+" }\n"
+"}\n"
+"set icon_mode_at_startup $env(X11VNC_ICON_MODE_AT_STARTUP)\n"
+"\n"
"if {![info exists env(X11VNC_ICON_MODE)]} {\n"
" set icon_mode 0\n"
"} elseif {$env(X11VNC_ICON_MODE) == \"\" || $env(X11VNC_ICON_MODE) == \"0\"} {\n"
@@ -6169,6 +6250,7 @@ char gui_code[] = "";
" set tray_running 1\n"
" }\n"
"}\n"
+"\n"
"set icon_setpasswd 0\n"
"if {[info exists env(X11VNC_ICON_SETPASS)]} {\n"
" if {$env(X11VNC_ICON_SETPASS) != \"\"} {\n"