755
777
"running x11vnc server. After modifying them press \\\"OK\\\" or \\\"Apply\\\"\n"
756
778
"to apply the changes, or press \\\"Cancel\\\" to skip applying them.\n"
758
" - \\\"Accept Connections\\\" toggles whether VNC viewers are allowed\n"
759
" to connect or not. It corresponds to the \\\"-R unlock\\\" and \\\"-R lock\\\"\n"
760
" remote-control commands.\n"
762
" - \\\"Ask for Confirmation\\\" toggles whether a popup menu will be presented\n"
763
" at the X display when a new VNC viewer attempts to connect. The person\n"
764
" sitting at the X display can choose to accept or reject the connection\n"
765
" or accept the connection in View-Only mode. It corresponds to the \n"
766
" \\\"-R accept:popup\\\" and \\\"-R accept:\\\" remote-control commands.\n"
768
" - \\\"All Clients ViewOnly\\\" toggles whether the entire VNC desktop is\n"
769
" view only. All clients will only be able to watch when this is set\n"
770
" (regardless of how they logged in). It corresponds to the\n"
771
" \\\"-R viewonly\\\" and \\\"-R noviewonly\\\" remote-control commands.\n"
773
" - \\\"Shared\\\" toggles whether multiple simultaneous connections are\n"
774
" allowed or not. It corresponds to the \\\"-R shared\\\" and \\\"-R noshared\\\"\n"
775
" remote-control commands.\n"
777
" - \\\"Password\\\" lets you set the session password viewers may use to gain full\n"
778
" access to the display. This will only work if x11vnc was started with \n"
780
" Accept Connections:\n"
782
" Toggles whether VNC viewers are allowed to connect or not. It corresponds\n"
783
" to the \\\"-R unlock\\\" and \\\"-R lock\\\" remote-control commands.\n"
785
" Ask for Confirmation:\n"
787
" Toggles whether a popup menu will be presented at the X display when\n"
788
" a new VNC viewer attempts to connect. The person sitting at the X\n"
789
" display can choose to accept or reject the connection or accept the\n"
790
" connection in ViewOnly mode. It corresponds to the \\\"-R accept:popup\\\"\n"
791
" and \\\"-R accept:\\\" remote-control commands.\n"
793
" All Clients ViewOnly:\n"
795
" Toggles whether the entire VNC desktop is view only. All clients\n"
796
" will only be able to watch when this is set (regardless of how they\n"
797
" logged in). It corresponds to the \\\"-R viewonly\\\" and \\\"-R noviewonly\\\"\n"
798
" remote-control commands.\n"
802
" Toggles whether multiple simultaneous viewer connections are allowed\n"
803
" or not. It corresponds to the \\\"-R shared\\\" and \\\"-R noshared\\\"\n"
804
" remote-control commands.\n"
806
" Advertise Service (Zeroconf):\n"
808
" Toggles whether this VNC server should advertize itself via Zeroconf\n"
809
" (also called Bonjour, mDNS, and avahi). Then VNC viewers can then find\n"
810
" this service on the local network. It corresponds to the \\\"-R zeroconf\\\"\n"
811
" and \\\"-R nozeroconf\\\" remote-control commands.\n"
813
" Serve Java Viewer Applet:\n"
815
" Toggles whether this VNC server should serve up a Java VNC Viewer\n"
816
" applet via HTTP on http://hostname:5800/ (or port 5800+n for VNC\n"
817
" port 5900+n). A java enabled Web Browser can then connect to the\n"
818
" desktopby VNC. If SSL is active then the HTTPS URL https://hostname:5900/\n"
819
" (etc.) will work as well. This requires the x11vnc java viewer jar file\n"
820
" (shared/x11vnc/classes) to be installed. It corresponds to the\n"
821
" \\\"-R http\\\" and \\\"-R nohttp\\\" remote commands.\n"
823
" Solid Background Color:\n"
825
" To improve VNC performance, if this option is set, then x11vnc will try\n"
826
" to make the desktop background a solid color (which compresses extremely\n"
827
" well compared to photo images, etc.) It corresponds to the \\\"-R solid\\\"\n"
828
" and \\\"-R nosolid\\\" remote commands.\n"
832
" Lets you set the session password viewers may use to gain full access\n"
833
" to the display. This will only work if x11vnc was started with the\n"
834
" -gui icon or -gui tray mode.\n"
836
" ViewOnly Password:\n"
838
" Lets you set the session password viewers may use to gain view only\n"
839
" access to the display. This will only work if x11vnc was started with\n"
779
840
" the -gui icon or -gui tray mode.\n"
781
" - \\\"ViewOnly Password\\\" lets you set the session password viewers may\n"
782
" use to gain view only access to the display. This will only work if\n"
783
" x11vnc was started with the -gui icon or -gui tray mode.\n"
785
"NOTE: These \\\"session\\\" passwords only last for the current x11vnc\n"
786
"session (they are not remembered, see the -storepasswd, -passwdfile,\n"
787
"and -rfbauth x11vnc options for using stored passwords).\n"
789
"If you set \\\"Password\\\" to the empty string that makes the \\\"View-Only\n"
790
"Password\\\" empty as well and removes the need for any password to log in.\n"
792
"If you set \\\"ViewOnly Password\\\" to the empty string that just removes\n"
793
"the ViewOnly log in aspect: \\\"Password\\\" is still required to log in.\n"
843
" NOTE: These \\\"session\\\" passwords only last for the current x11vnc\n"
844
" session (they are not remembered, see the -storepasswd, -passwdfile,\n"
845
" and -rfbauth x11vnc options for using stored passwords).\n"
847
" If you set \\\"Password\\\" to the empty string that makes the \\\"ViewOnly\n"
848
" Password\\\" empty as well and removes the need for any password to log in.\n"
850
" If you set \\\"ViewOnly Password\\\" to the empty string that just removes\n"
851
" the ViewOnly log in aspect: \\\"Password\\\" is still required to log in.\n"
795
853
" - The \\\"Help\\\" button shows this help text.\n"
2482
2550
"proc get_default_vars {} {\n"
2483
" global default_var\n"
2551
" global default_var env\n"
2485
2553
" set qry [all_query_vars]\n"
2487
2555
" append qry \",vncconnect\"\n"
2489
" set qargs [list \"-QD\" $qry]\n"
2490
" set all [run_remote_cmd $qargs]\n"
2560
" foreach s [split $qry \",\"] {\n"
2561
" if {$q != \"\"} {\n"
2567
" set qargs [list \"-QD\" $q]\n"
2568
" set a [run_remote_cmd $qargs]\n"
2569
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
2572
" puts \"---------------\"\n"
2574
" if {$all != \"\"} {\n"
2575
" append all \",\"\n"
2582
" if {$q != \"\"} {\n"
2583
" set qargs [list \"-QD\" $q]\n"
2584
" set a [run_remote_cmd $qargs]\n"
2585
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
2588
" puts \"---------------\"\n"
2590
" if {$all != \"\"} {\n"
2591
" append all \",\"\n"
2596
"# old way, qry too long...\n"
2597
"# set qargs [list \"-QD\" $qry]\n"
2598
"# set all [run_remote_cmd $qargs]\n"
2492
2600
" if {[regexp {ans=} $all]} {\n"
2493
2601
" #append_text \"Retrieved all default settings.\\n\"\n"
4087
4210
" set props_shared 0\n"
4212
" if {$props_shared == $prop0_shared} {incr fail}\n"
4089
4213
" set prop0_shared $props_shared\n"
4216
" if {$props_zeroconf != $prop0_zeroconf} {\n"
4217
" if {$did > 0} {after $aft}; incr did\n"
4218
" if {$props_zeroconf} {\n"
4219
" push_new_value \"zeroconf\" \"zeroconf\" 1 1\n"
4221
" push_new_value \"zeroconf\" \"nozeroconf\" 1 1\n"
4223
" if {$menu_var(zeroconf)} {\n"
4224
" set props_zeroconf 1\n"
4226
" set props_zeroconf 0\n"
4228
" if {$props_zeroconf == $prop0_zeroconf} {incr fail}\n"
4229
" set prop0_zeroconf $props_zeroconf\n"
4232
" if {$props_javaview != $prop0_javaview} {\n"
4233
" if {$did > 0} {after $aft}; incr did\n"
4234
" if {$props_javaview} {\n"
4235
" push_new_value \"http\" \"http\" 1 1\n"
4237
" push_new_value \"http\" \"nohttp\" 1 1\n"
4239
" if {$menu_var(http)} {\n"
4240
" set props_javaview 1\n"
4242
" set props_javaview 0\n"
4244
" if {$props_javaview == $prop0_javaview} {incr fail}\n"
4245
" set prop0_javaview $props_javaview\n"
4248
" if {$props_solid != $prop0_solid} {\n"
4249
" if {$did > 0} {after $aft}; incr did\n"
4250
" if {$props_solid} {\n"
4251
" push_new_value \"solid\" \"solid\" 1 1\n"
4253
" push_new_value \"solid\" \"nosolid\" 1 1\n"
4255
" if {$menu_var(solid)} {\n"
4256
" set props_solid 1\n"
4258
" set props_solid 0\n"
4260
" if {$props_solid == $prop0_solid} {incr fail}\n"
4261
" set prop0_solid $props_solid\n"
4093
4265
" if {$props_passwd != $prop0_passwd} {\n"
4153
4325
" if {$case == \"fpw\"} {\n"
4154
4326
" if {$did > 0} {after $aft}; incr did\n"
4155
4327
" push_new_value \"passwd\" \"passwd\" \"$props_passwd\" 1\n"
4328
" if {$props_passwd == $prop0_passwd} {incr fail}\n"
4156
4329
" set prop0_passwd $props_passwd\n"
4158
4331
" if {$case == \"vpw\"} {\n"
4159
4332
" if {$did > 0} {after $aft}; incr did\n"
4160
4333
" push_new_value \"viewpasswd\" \"viewpasswd\" \"$props_viewpasswd\" 1\n"
4334
" if {$props_viewpasswd == $prop0_viewpasswd} {incr fail}\n"
4161
4335
" set prop0_viewpasswd $props_viewpasswd\n"
4339
" if {$props_accept != $prop0_accept} {\n"
4340
" if {$did > 0} {after $aft}; incr did\n"
4341
" if {$props_accept} {\n"
4342
" push_new_value \"unlock\" \"unlock\" 1 0\n"
4344
" push_new_value \"lock\" \"lock\" 1 0\n"
4346
" if {$props_accept == $prop0_accept} {incr fail}\n"
4347
" set prop0_accept $props_accept\n"
4165
4350
" props_widgets normal\n"
4351
" if {$fail > 0} {\n"
4168
4358
"proc props_advanced {} {\n"
4169
" global icon_mode icon_win props_win full_win\n"
4359
" global icon_mode props_win full_win\n"
4170
4360
" global props_advanced_first\n"
4172
4362
" if ![info exists props_advanced_first] {\n"
4184
4374
" set w $full_win\n"
4185
4375
" wm minsize $w [winfo width $w] [winfo height $w]\n"
4377
" push_new_value \"remote-cmd\" \"remote-cmd\" \"Q:clients\" 1\n"
4189
"proc do_props {{msg \"\"}} {\n"
4380
"proc do_props {} {\n"
4190
4381
" global props_accept props_confirm props_viewonly props_shared\n"
4382
" global props_zeroconf props_javaview props_solid\n"
4191
4383
" global props_passwd props_viewpasswd\n"
4192
4384
" global prop0_accept prop0_confirm prop0_viewonly prop0_shared\n"
4385
" global prop0_zeroconf prop0_javaview prop0_solid\n"
4193
4386
" global prop0_passwd prop0_viewpasswd\n"
4194
4387
" global menu_var unset_str\n"
4195
4388
" global have_labelframes ffont bfont\n"
4196
4389
" global props_buttons icon_noadvanced\n"
4197
4390
" global icon_mode icon_mode_at_startup\n"
4198
4391
" global screen_height screen_width\n"
4392
" global do_props_msg\n"
4395
" if {[info exists do_props_msg]} {\n"
4396
" set msg $do_props_msg\n"
4200
4399
" check_update_vars\n"
4203
4403
" if {$screen_height <= 360} {\n"
4204
4404
" set pady 0m\n"
4257
4457
" set prop0_shared $props_shared\n"
4459
" if [info exists menu_var(zeroconf)] {\n"
4460
" if {$menu_var(zeroconf) == $unset_str || $menu_var(zeroconf) == \"\"} {\n"
4461
" set props_zeroconf 0\n"
4462
" } elseif ($menu_var(zeroconf)) {\n"
4463
" set props_zeroconf 1\n"
4465
" set props_zeroconf 0\n"
4468
" set menu_var(zeroconf) 0\n"
4469
" set props_zeroconf 0\n"
4471
" set prop0_zeroconf $props_zeroconf\n"
4473
" if [info exists menu_var(http)] {\n"
4474
" if {$menu_var(http) == $unset_str || $menu_var(http) == \"\"} {\n"
4475
" set props_javaview 0\n"
4476
" } elseif ($menu_var(http)) {\n"
4477
" set props_javaview 1\n"
4479
" set props_javaview 0\n"
4482
" set menu_var(http) 0\n"
4483
" set props_javaview 0\n"
4485
" set prop0_javaview $props_javaview\n"
4487
" if [info exists menu_var(solid)] {\n"
4488
" if {$menu_var(solid) == $unset_str || $menu_var(solid) == \"\"} {\n"
4489
" set props_solid 0\n"
4490
" } elseif ($menu_var(solid)) {\n"
4491
" set props_solid 1\n"
4493
" set props_solid 0\n"
4496
" set menu_var(solid) 0\n"
4497
" set props_solid 0\n"
4499
" set prop0_solid $props_solid\n"
4259
4501
" if ![info exists props_passwd] {\n"
4260
4502
" set props_passwd \"\"\n"
4289
4534
" set b2 \"$w.buttons2\"\n"
4292
" button $b2.advanced -text \"Advanced ...\" \\\n"
4293
" -command \"destroy $w; props_advanced\" -font $bfont\n"
4537
" button $b2.advanced -text \" Advanced ... \" \\\n"
4538
" -command \"destroy $wp; props_advanced\" -font $bfont\n"
4294
4539
" if {! $icon_noadvanced} {\n"
4295
4540
" lappend props_buttons $b2.advanced\n"
4296
4541
" pack $b2.advanced -side left -expand 0\n"
4299
" button $b2.help -text \"Help\" -command \"menu_help Properties\" -font $bfont\n"
4544
" button $b2.help -text \" Help \" -command \"menu_help Properties\" -font $bfont\n"
4300
4545
" lappend props_buttons $b2.help\n"
4301
4546
" pack $b2.help -side left -expand 0\n"
4548
" set pw \"$w.passwd\"\n"
4549
" if {$have_labelframes} {\n"
4550
" labelframe $pw -text \"Password\" -font $bfont\n"
4554
" label $l -text \"Password:\" -justify left -anchor w -font $bfont\n"
4555
" pack $pw.l -fill x -expand 1 -padx 1m -pady 0m -side top\n"
4557
" entry $pw.e -show \"*\" -textvariable props_passwd -font $bfont\n"
4558
" pack $pw.e -fill x -expand 1 -padx 1m -pady $pady -side top\n"
4560
" global x11vnc_icon_mode\n"
4561
" if {! $x11vnc_icon_mode} {\n"
4562
" catch { $pw.e configure -state disabled}\n"
4563
" if {! $have_labelframes} {\n"
4564
" catch { $pw.l configure -state disabled}\n"
4567
" lappend props_buttons $pw.e\n"
4303
4571
" set vp \"$w.viewpw\"\n"
4304
4572
" if {$have_labelframes} {\n"
4305
4573
" labelframe $vp -text \"ViewOnly Password\" -font $bfont\n"
4312
4580
" entry $vp.e -show \"*\" -textvariable props_viewpasswd -font $bfont\n"
4313
4581
" pack $vp.e -fill x -expand 1 -padx 1m -pady $pady -side top\n"
4316
" lappend props_buttons $vp.e\n"
4318
" set pw \"$w.passwd\"\n"
4319
" if {$have_labelframes} {\n"
4320
" labelframe $pw -text \"Password\" -font $bfont\n"
4583
" if {! $x11vnc_icon_mode} {\n"
4584
" catch { $vp.e configure -state disabled}\n"
4585
" if {! $have_labelframes} {\n"
4586
" catch { $vp.l configure -state disabled}\n"
4324
" label $l -text \"Password:\" -justify left -anchor w -font $bfont\n"
4325
" pack $pw.l -fill x -expand 1 -padx 1m -pady 0m -side top\n"
4589
" lappend props_buttons $vp.e\n"
4327
" entry $pw.e -show \"*\" -textvariable props_passwd -font $bfont\n"
4328
" pack $pw.e -fill x -expand 1 -padx 1m -pady $pady -side top\n"
4330
4592
" if {! $icon_mode_at_startup} {\n"
4331
4593
" $vp.e configure -state disabled\n"
4369
4647
" pack $b2 -side bottom -fill x -pady $pady -padx $px\n"
4370
4648
" pack $vp -side bottom -fill x -pady $pady -padx $px\n"
4371
4649
" pack $pw -side bottom -fill x -pady $pady -padx $px\n"
4650
" pack $sb -side bottom -fill x -pady 0m -padx $px\n"
4651
" pack $jv -side bottom -fill x -pady 0m -padx $px\n"
4652
" pack $zc -side bottom -fill x -pady 0m -padx $px\n"
4372
4653
" pack $sh -side bottom -fill x -pady 0m -padx $px\n"
4373
4654
" pack $vo -side bottom -fill x -pady 0m -padx $px\n"
4374
4655
" pack $cf -side bottom -fill x -pady 0m -padx $px\n"
4375
4656
" pack $ac -side bottom -fill x -pady 0m -padx $px\n"
4658
" global show_props_instructions\n"
4659
" if {![info exists show_props_instructions]} {\n"
4660
" set show_props_instructions 1\n"
4663
" wm withdraw .props\n"
4667
" pack $wl -side left\n"
4377
4669
" if {$msg != \"\"} {\n"
4378
4670
" set tw [textwidth $msg]\n"
4379
4671
" set th [textheight $msg]\n"
4380
4672
" set th [expr $th - 1]\n"
4381
" set ms \"$w.msg\"\n"
4673
" set ms \".props.msg\"\n"
4382
4674
" text $ms -font $ffont -relief ridge -width $tw -height $th\n"
4383
4675
" $ms insert 1.0 $msg\n"
4384
" pack $ms -side bottom -fill x -pady $pady -padx $px\n"
4677
" set si \"$wl.instructions\"\n"
4679
" checkbutton $si.button -text \"Show Instructions\" \\\n"
4680
" -variable show_props_instructions -anchor w -font $bfont \\\n"
4681
" -command \"toggle_instructions $ms $pady $px\"\n"
4683
" pack $si.button -fill x -expand 1 -padx 1m -pady $pady\n"
4684
" pack $si -side bottom -fill x -pady 0m -padx $px\n"
4686
" if {$show_props_instructions} {\n"
4687
" pack $ms -side left -fill both\n"
4388
" lappend props_buttons $ac.button $cf.button $vo.button $sh.button\n"
4694
" lappend props_buttons $ac.button $cf.button $vo.button $sh.button $zc.button $jv.button $sb.button\n"
4390
4699
" wm resizable $w 1 0\n"
4391
4700
" center_win $w\n"
4393
" wm minsize $w [winfo width $w] [winfo height $w]\n"
4703
" #wm minsize $w [winfo width $w] [winfo height $w]\n"
4395
4705
" tkwait window $w\n"
4706
" set show_props_instructions 0\n"
4709
"proc toggle_instructions {ms pady px} {\n"
4710
" global show_props_instructions\n"
4711
" if {$show_props_instructions} {\n"
4712
" pack $ms -side left -fill both\n"
4714
" pack forget $ms\n"
4716
" catch {pack .props}\n"
4398
4720
"proc do_new_client {} {\n"
5973
6350
" if {$db} {puts stderr \"run_remote_cmd_via_sock: $docmd \\\"$str\\\"\"}\n"
5974
" puts $client_sock $str\n"
6351
" catch {puts $client_sock $str}\n"
5975
6352
" if {$db} {puts stderr \"run_remote_cmd_via_sock: flush\"}\n"
5976
" flush $client_sock\n"
6353
" catch {flush $client_sock}\n"
5977
6354
" if {$db} {puts stderr \"run_remote_cmd_via_sock: gets\"}\n"
5978
" gets $client_sock res\n"
6355
" catch {gets $client_sock res}\n"
5979
6356
" if {$db} {puts stderr \"run_remote_cmd_via_sock: \\\"$res\\\"\"}\n"
5980
6357
" set res [string trim $res]\n"
6359
" if [regexp {=clients:} $res] {\n"
6360
" regsub {^.*=clients:} $res \"\" cres\n"
6361
" regsub {,aro=.*$} $cres \"\" cres\n"
6362
" regsub {,ans=.*$} $cres \"\" cres\n"
6363
" if {$cres == \"none\"} {\n"
6366
" update_clients_menu $cres\n"
6367
" set client_str $cres\n"
6368
" set_client_balloon $cres\n"
5982
6371
" if [regexp {^clients:} $res] {\n"
5983
6372
" regsub {^clients:} $res \"\" tmp\n"
5984
6373
" if {$tmp == \"none\"} {\n"
6168
6557
" return $menu_var(WindowView)\n"
6560
"proc dono {a b c} {\n"
6564
"proc do_port_prompt {} {\n"
6565
" global bfont ffont\n"
6566
" global port_reply port_set\n"
6569
" for {set i 0} {$i < 50} {incr i} {\n"
6571
" set try [expr $guess + $i]\n"
6572
" catch {set fh [socket -server dono $try]}\n"
6573
" if {$fh != \"\"} {\n"
6574
" catch {close $fh}\n"
6580
" catch {set hn [exec uname -n]}\n"
6581
" if {$hn == \"\"} {\n"
6582
" set hn \"hostname\"\n"
6585
" set text \" Set the x11vnc Listening Port:\n"
6587
" VNC Display :0 corresponds to TCP port 5900\n"
6588
" VNC Display :1 corresponds to TCP port 5901\n"
6591
" In the Entry below, indicate a Port for x11vnc to listen on. \n"
6593
" Note that to connect to x11vnc, a VNC Viewer will need to\n"
6594
" know your selection, for example:\n"
6596
" vncviewer $hn:0\n"
6597
" vncviewer $hn:1\n"
6600
" Your firewall may block incoming connections to TCP ports;\n"
6601
" if it does you may need to reconfigure it. \n"
6603
" You can also set some additional parameters:\n"
6605
" - Enable SSL encryption.\n"
6606
" (requires an SSL enabled vncviewer, such as SSVNC) \n"
6607
" - Listen only on localhost. (e.g. for an SSH tunnel)\n"
6608
" - Enable UltraVNC or TightVNC File transfer.\n"
6610
" set port_set $guess\n"
6611
" set port_reply \"\"\n"
6614
" wm title .pp \"Select x11vnc port\"\n"
6616
" wm protocol . WM_DELETE_WINDOW \"destroy .; exit\"\n"
6617
" wm protocol .pp WM_DELETE_WINDOW \"destroy .pp; exit\"\n"
6619
" label .pp.m -text \"$text\" -relief ridge -justify left -font $ffont\n"
6621
" global tk_version\n"
6623
" if [info exists tk_version] {\n"
6624
" if [regexp {^8\\.[0-3]$} $tk_version] {\n"
6627
" if [regexp {^[3-7]\\.} $tk_version] {\n"
6633
" frame .pp.f -bd 1 -relief ridge\n"
6635
" frame .pp.f -bd 1 -relief ridge -pady 2\n"
6637
" label .pp.f.l -text \"Port: \" -font $bfont\n"
6638
" entry .pp.f.e -width 8 -textvariable port_set -font $ffont\n"
6639
" global enable_ssl; set enable_ssl 0\n"
6640
" if [info exists env(X11VNC_SSL_ENABLED)] {\n"
6641
" set enable_ssl 1\n"
6643
" checkbutton .pp.f.ssl -relief raised -pady 3 -padx 3 -text \"Enable SSL\" -variable enable_ssl -font $bfont\n"
6644
" global localhost; set localhost 0\n"
6645
" if [info exists env(X11VNC_LOCALHOST_ENABLED)] {\n"
6646
" set localhost 1\n"
6648
" checkbutton .pp.f.loc -relief raised -pady 3 -padx 3 -text \"Listen on localhost\" -variable localhost -font $bfont\n"
6649
" pack .pp.f.l .pp.f.e -side left\n"
6650
" pack .pp.f.loc .pp.f.ssl -side right\n"
6653
" frame .pp.t -bd 1 -relief ridge\n"
6655
" frame .pp.t -bd 1 -relief ridge -pady 2\n"
6657
" global file_transfer; set file_transfer \"none\"\n"
6658
" if [info exists env(X11VNC_FILETRANSFER_ENABLED)] {\n"
6659
" set file_transfer $env(X11VNC_FILETRANSFER_ENABLED)\n"
6661
" label .pp.t.l -text \"File Transfer: \" -font $bfont\n"
6662
" radiobutton .pp.t.none -text \"None\" -variable file_transfer -value \"none\" -font $bfont\n"
6663
" radiobutton .pp.t.ultra -text \"UltraVNC\" -variable file_transfer -value \"ultra\" -font $bfont\n"
6664
" radiobutton .pp.t.tight -text \"TightVNC\" -variable file_transfer -value \"tight\" -font $bfont\n"
6665
" pack .pp.t.l .pp.t.none .pp.t.ultra .pp.t.tight -side left\n"
6667
" frame .pp.o -bd 1 -relief ridge\n"
6668
" button .pp.o.ok -text \"OK\" -command \"set port_reply 1; destroy .pp\" -font $bfont\n"
6669
" button .pp.o.cancel -text \"Cancel\" -command \"set port_reply 0; destroy .pp\" -font $bfont\n"
6670
" pack .pp.o.ok .pp.o.cancel -side left -fill x -expand 1\n"
6671
" pack .pp.m -side top -fill x -expand 1 \n"
6672
" pack .pp.f .pp.t .pp.o -side top -fill x\n"
6675
" .pp.f.e icursor end\n"
6677
" wm withdraw .pp\n"
6681
" wm minsize .pp [winfo width .pp] [winfo height .pp]\n"
6683
" bind .pp.f.e <KeyPress-Return> \"set port_reply 1; destroy .pp\"\n"
6685
" vwait port_reply\n"
6687
" if {$port_reply} {\n"
6688
" regsub -all {^:} $port_set \"\" port_set\n"
6689
" regsub -all {[ \\t]} $port_set \"\" port_set\n"
6690
" if {[regexp {^[0-9][0-9]*$} $port_set]} {\n"
6691
" if {$port_set < 0} {\n"
6692
" set port_set [expr 0 - $port_set]\n"
6693
" } elseif {$port_set < 200} {\n"
6694
" set port_set [expr $port_set + 5900]\n"
6696
" puts \"$port_set:ssl${enable_ssl}:localhost$localhost:ft_$file_transfer\"\n"
6171
6701
"proc change_view_state {} {\n"
6172
6702
" global menu_var gui_current_state\n"
6353
6891
"set snfont \"-adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-*\"\n"
6354
6892
"set ffont \"fixed\"\n"
6896
" foreach fam [font families] {\n"
6897
" if {$fam == \"helvetica\"} {\n"
6900
" if {$fam == \"Helvetica\"} {\n"
6906
"if {$got_helv} {\n"
6907
" set bfont \"Helvetica -12 bold\"\n"
6908
" set sfont \"Helvetica -10 bold\"\n"
6909
" set snfont \"Helvetica -10\"\n"
6356
6912
"set ls \"\"\n"
6357
6913
"catch {set ls [font metrics $bfont -linespace]}\n"
6358
"if {$ls != \"\"} {\n"
6359
" if {$ls > 14} {\n"
6360
" # some recent setups have BIG rendering for the above fonts:\n"
6914
"if {$ls != \"\" && $ls > 14} {\n"
6915
" # some recent setups have BIG rendering for the above fonts.\n"
6916
" # on recent (8/08) debian these are really ragged:\n"
6361
6917
" set bfont \"-adobe-helvetica-bold-r-*-*-*-90-*-*-*-*-*-*\"\n"
6362
6918
" set sfont \"-adobe-helvetica-bold-r-*-*-*-75-*-*-*-*-*-*\"\n"
6363
6919
" set snfont \"-adobe-helvetica-medium-r-*-*-*-75-*-*-*-*-*-*\"\n"
6922
" catch {set ls [font metrics $bfont -linespace]}\n"
6923
" if {$ls != \"\" && $ls < 14} {\n"
6924
" # these are bigger but look better... but for how long?\n"
6925
" set bfont \"-adobe-helvetica-bold-r-*-*-*-100-*-*-*-*-*-*\"\n"
6926
" set sfont \"-adobe-helvetica-bold-r-*-*-*-80-*-*-*-*-*-*\"\n"
6927
" set snfont \"-adobe-helvetica-medium-r-*-*-*-80-*-*-*-*-*-*\"\n"
6929
" # maybe consider... {-font font Font {Helvetica -12 bold} {Helvetica -12 bold}}\n"
6930
" # or stick with system font like ssvnc.\n"
6934
"# need to check if \"fixed\" font under XFT on tk8.5 is actually fixed width!!\n"
6936
"catch {set ls [font metrics $ffont -linespace]}\n"
6938
"catch {set fs [font metrics $ffont -fixed]}\n"
6940
"if {$fs != \"\" && $fs != \"1\"} {\n"
6943
"if {$ls != \"\" && $ls > 14} {\n"
6947
" foreach fn [font names] {\n"
6948
" if {$fn == \"TkFixedFont\"} {\n"
6366
6955
"set help_indent 24;\n"
6367
6956
"set reply_xdisplay \"\"\n"
6368
6957
"set all_settings \"None so far.\"\n"
6397
6986
"set screen_height [winfo screenheight .]\n"
6398
6987
"set screen_width [winfo screenwidth .]\n"
6399
"if {$screen_height < 500} {\n"
6400
" # short screen, PDA?\n"
6401
" set max_text_height 22\n"
6402
" set text_height 13\n"
6403
" if {$screen_height <= 360} {\n"
6405
" set max_text_height 16\n"
6406
" set max_text_width 60\n"
6407
" set text_height 11\n"
6988
"if {$screen_height < 700} {\n"
6989
" # short screen, netbook?\n"
6990
" set max_text_height 30\n"
6991
" if {$screen_height < 500} {\n"
6992
" # short screen, PDA?\n"
6993
" set max_text_height 22\n"
6994
" set text_height 13\n"
6995
" if {$screen_height <= 360} {\n"
6997
" set max_text_height 16\n"
6998
" set max_text_width 60\n"
6999
" set text_height 11\n"
6410
7003
"if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {\n"
6640
7251
"proc check_setpasswd {} {\n"
6641
" global icon_setpasswd\n"
7252
" global env icon_setpasswd\n"
7253
" global do_props_msg\n"
7254
" set do_props_msg \"\"\n"
6642
7255
" if {$icon_setpasswd} {\n"
6643
" set m \"You must specify a Session Password\\n\" \n"
6644
" set m \"${m}before VNC clients can connect.\\n\" \n"
6645
" set m \"${m}Enter one in the Password field\\n\" \n"
6646
" set m \"${m}and Press \\\"OK\\\". The password(s) is\\n\" \n"
6647
" set m \"${m}only for this x11vnc session.\\n\" \n"
6649
" #push_new_value \"unlock\" \"unlock\" 1 0\n"
7257
" set m \"${m} Note the x11vnc icon in the system tray.\\n\" \n"
7258
" set m \"${m} This panel is its 'Properties' dialog.\\n\" \n"
7259
" set m \"${m}\\n\" \n"
7260
" set m \"${m} To specify a Session Password and to\\n\" \n"
7261
" set m \"${m} allow VNC viewers to connect, follow\\n\" \n"
7262
" set m \"${m} these steps:\\n\" \n"
7263
" set m \"${m}\\n\" \n"
7264
" set m \"${m} Enter a passwd in the Password field\\n\" \n"
7265
" set m \"${m} (it can be left blank.) You can also\\n\" \n"
7266
" set m \"${m} supply a ViewOnly passwd if desired.\\n\" \n"
7267
" set m \"${m}\\n\" \n"
7268
" set m \"${m} Set 'Accept Connections' and then Press \\n\" \n"
7269
" set m \"${m} 'Apply' to allow incoming connections.\\n\" \n"
7270
" set m \"${m}\\n\" \n"
7271
" set m \"${m} No Viewer can connect until you do this.\\n\" \n"
7272
" set m \"${m}\\n\" \n"
7273
" set m \"${m} The passwords are only for this x11vnc\\n\" \n"
7274
" set m \"${m} session and are not saved. Run x11vnc\\n\" \n"
7275
" set m \"${m} manually for more control (e.g. -rfbauth \\n\" \n"
7276
" set m \"${m} for a saved password.)\\n\" \n"
7277
" set m \"${m}\\n\" \n"
7278
" set m \"${m} See 'Help' for details on each option.\\n\" \n"
7280
" global x11vnc_cmdline\n"
7283
" if {[info exists x11vnc_cmdline]} {\n"
7284
" if [regexp -- {-ssl} $x11vnc_cmdline] {\n"
7288
" if {$dossl || [info exists env(X11VNC_GOT_SSL)]} {\n"
7289
" set m \"${m}\\n\" \n"
7290
" set m \"${m} SSL encryption mode active. You can\\n\" \n"
7291
" set m \"${m} find your Public Cert in the Logfile\\n\" \n"
7292
" set m \"${m} and also the ~/.vnc/certs directory.\\n\" \n"
7295
" if {[info exists env(X11VNC_SETPASS_FAIL)]} {\n"
7297
" if {[info exists env(X11VNC_GOT_RFBPORT_VAL)]} {\n"
7298
" if {$env(X11VNC_GOT_RFBPORT_VAL) > 0} {\n"
7299
" set pp $env(X11VNC_GOT_RFBPORT_VAL)\n"
7303
" set m \" The x11vnc program failed to start! \\n\"\n"
7304
" set m \"${m}\\n\" \n"
7305
" set m \"${m} Maybe there is another VNC server\\n\"\n"
7306
" set m \"${m} already listening on port $pp?\\n\"\n"
7307
" set m \"${m}\\n\" \n"
7308
" set m \"${m} You will need to start over after\\n\"\n"
7309
" set m \"${m} you make sure x11vnc can start.\\n\"\n"
7312
" set do_props_msg $m\n"