Example Java Applet log output:

Since getting the SSL Java Applet to connect through a single port to x11vnc can be tricky, here is some example logging output showing the sequences taking place.

Note the multiple requests by the browser/applet for the VncViewer.jar file. This complicates matters since x11vnc has to handle each one of them with a forked helper process that tries to determine if the connection is HTTPS or VNC (it waits for 20-30 seconds and if it receives no input it assumes VNC, which may be wrong if the user is sitting at a certificate dialog at his web browser.).

This example typed this URL in the browser: https://haystack:5900/ (i.e the hostname is haystack and x11vnc -ssl ... is listening on the default port 5900).

Tip: It really helps to click on the Browser and Java Applet "Yes" certificate, etc. dialogs about the search relatively quickly. Otherwise the x11vnc helper process will timeout and think the connection is for VNC, but it is really a HTTPS connection where the user is pondering the certificate dialog.

% x11vnc -nopw -ssl SAVE -http -scale 1/3
02/06/2008 09:11:55 x11vnc version: 0.9.4 lastmod: 2008-06-01
02/06/2008 09:11:55 Using X display :0.0
02/06/2008 09:11:55 
02/06/2008 09:11:55 ------------------ USEFUL INFORMATION ------------------
02/06/2008 09:11:55 Disabling XFIXES mode: display does not support it.
02/06/2008 09:11:55 Disabling X DAMAGE mode: display does not support it.
02/06/2008 09:11:55 
02/06/2008 09:11:55 Wireframing: -wireframe mode is in effect for window moves.
02/06/2008 09:11:55   If this yields undesired behavior (poor response, painting
02/06/2008 09:11:55   errors, etc) it may be disabled:
02/06/2008 09:11:55    - use '-nowf' to disable wireframing completely.
02/06/2008 09:11:56    - use '-nowcr' to disable the Copy Rectangle after the
02/06/2008 09:11:56      moved window is released in the new position.
02/06/2008 09:11:56   Also see the -help entry for tuning parameters.
02/06/2008 09:11:56   You can press 3 Alt_L's (Left "Alt" key) in a row to 
02/06/2008 09:11:56   repaint the screen, also see the -fixscreen option for
02/06/2008 09:11:56   periodic repaints.
02/06/2008 09:11:56   Note: '-scale' is on and this can cause more problems.
02/06/2008 09:11:56 GrabServer control via XTEST.
02/06/2008 09:11:56 
02/06/2008 09:11:56 Scroll Detection: -scrollcopyrect mode is in effect to
02/06/2008 09:11:56   use RECORD extension to try to detect scrolling windows
02/06/2008 09:11:56   (induced by either user keystroke or mouse input).
02/06/2008 09:11:56   If this yields undesired behavior (poor response, painting
02/06/2008 09:11:56   errors, etc) it may be disabled via: '-noscr'
02/06/2008 09:11:56   Also see the -help entry for tuning parameters.
02/06/2008 09:11:56   You can press 3 Alt_L's (Left "Alt" key) in a row to 
02/06/2008 09:11:56   repaint the screen, also see the -fixscreen option for
02/06/2008 09:11:56   periodic repaints.
02/06/2008 09:11:56   Note: '-scale' is on and this can cause more problems.
02/06/2008 09:11:56 
02/06/2008 09:11:56 XKEYBOARD: all 28 "must have" keysyms accounted for.
02/06/2008 09:11:56   Not automatically switching to -xkb mode.
02/06/2008 09:11:56   If some keys still cannot be typed, try using -xkb.
02/06/2008 09:11:56   Also, remember "-remap DEAD" for accenting characters.
02/06/2008 09:11:56 X FBPM extension not supported.
02/06/2008 09:11:56 X display is capable of DPMS.
02/06/2008 09:11:56 --------------------------------------------------------
02/06/2008 09:11:56 
02/06/2008 09:11:56 Default visual ID: 0x23
02/06/2008 09:11:57 Read initial data from X display into framebuffer.
02/06/2008 09:11:57 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/7680
02/06/2008 09:11:57 scaling screen: 1920x1200 -> 640x400  scale_fac=0.33333
02/06/2008 09:11:57 
02/06/2008 09:11:57 Initializing SSL (server connect mode).
02/06/2008 09:11:57 RAND_file_name: /home/runge/.rnd
02/06/2008 09:11:57 initialized PRNG with 1088 random bytes.
02/06/2008 09:11:57 created  512 bit temporary RSA key: 0.010s
02/06/2008 09:11:57 created 1024 bit temporary RSA key: 0.136s
02/06/2008 09:11:57 
02/06/2008 09:11:57 Using SSL Certificate:

-----BEGIN CERTIFICATE-----
MIID2jCCAsKgAwIBAgIJAICMrC7L60INMA0GCSqGSIb3DQEBBAUAMIGgMQswCQYD
VQQGEwJBVTEOMAwGA1UEBxMFTGludXgxIzAhBgNVBAsTGmhheXN0YWNrLTExOTI0
MDQyNTIuMjcwMzU4MQ8wDQYDVQQKEwZ4MT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48L3stASCw8Xn
KkviKoYMv3dkgObEoYlwo85lMg0gkvHsQwQIYxWePsV2KRrq1VuyLMxEz0b4VKlb
EEC01PEPzhKntMS1mnocgXo+/IVPlHw4J0dRT0WU
-----END CERTIFICATE-----

02/06/2008 09:11:57 using PEM /home/runge/.vnc/certs/server.pem  0.104s
02/06/2008 09:11:57 
02/06/2008 09:11:57 
02/06/2008 09:11:57 X display :0.0 is 32bpp depth=24 true color
02/06/2008 09:11:57 
02/06/2008 09:11:57 scale_and_mark_rect: using constant pixel weight speedup for 1/3
02/06/2008 09:11:57 Autoprobing TCP port 
02/06/2008 09:11:57 Autoprobing selected port 5900
02/06/2008 09:11:57 openssl_port: listen on port/sock 5900/9

The SSL VNC desktop is:  haystack:0
02/06/2008 09:11:57 check_httpdir: trying to guess httpdir... x11vnc
02/06/2008 09:11:57 check_httpdir: guessed directory:
02/06/2008 09:11:57    /home/runge/bin/../share/x11vnc/classes/ssl
02/06/2008 09:11:57 http_connections: turning on http service.
02/06/2008 09:11:57 Listening for HTTP connections on TCP port 5800
02/06/2008 09:11:57   URL http://haystack:5800
02/06/2008 09:11:58 fb read rate: 10 MB/sec
02/06/2008 09:11:58 screen setup finished.
02/06/2008 09:11:58 
02/06/2008 09:11:58 The URLs printed out below ('Java ... viewer URL') can
02/06/2008 09:11:58 be used for Java enabled Web browser connections.
02/06/2008 09:11:58 Here are some additional possibilities:
02/06/2008 09:11:58 
02/06/2008 09:11:58 https://host:port/proxy.vnc (MUST be used if Web Proxy used)
02/06/2008 09:11:58 
02/06/2008 09:11:58 https://host:port/ultra.vnc (Use UltraVNC Java Viewer)
02/06/2008 09:11:58 https://host:port/ultraproxy.vnc (Web Proxy with UltraVNC)
02/06/2008 09:11:58 https://host:port/ultrasigned.vnc (Signed UltraVNC Filexfer)
02/06/2008 09:11:58 
02/06/2008 09:11:58 Where you replace "host:port" with that printed below, or
02/06/2008 09:11:58 whatever is needed to reach the host e.g. Internet IP number
02/06/2008 09:11:58 

The SSL VNC desktop is:  haystack:0
Java SSL viewer URL:     https://haystack:5900/
Java SSL viewer URL:     http://haystack:5800/
PORT=5900
SSLPORT=5900
02/06/2008 09:12:19 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:19 SSL: spawning helper process to handle: 192.168.2.2:35545
02/06/2008 09:12:23 SSL: ssl_helper[19395]: SSL_accept() succeeded for: 192.168.2.2:35545
02/06/2008 09:12:23 SSL: ssl_helper[19395]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:23 SSL: accept_openssl: cookie from ssl_helper FAILED. 35
02/06/2008 09:12:23 SSL: BUT WAIT! HTTPS for helper process succeeded. Good.
02/06/2008 09:12:24 httpd: get '' for 127.0.0.1
02/06/2008 09:12:24 httpd: defaulting to 'index.vnc'
02/06/2008 09:12:26 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:26 SSL: spawning helper process to handle: 192.168.2.2:35548
02/06/2008 09:12:29 SSL: ssl_helper[19403]: SSL_accept() succeeded for: 192.168.2.2:35548
02/06/2008 09:12:29 SSL: ssl_helper[19403]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:31 SSL: accept_openssl: cookie from ssl_helper FAILED. 35
02/06/2008 09:12:31 SSL: BUT WAIT! HTTPS for helper process succeeded. Good.
02/06/2008 09:12:31 httpd: get 'VncViewer.jar' for 127.0.0.1
02/06/2008 09:12:31 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:31 SSL: spawning helper process to handle: 192.168.2.2:35549
02/06/2008 09:12:31 SSL: ssl_helper[19406]: SSL_accept() succeeded for: 192.168.2.2:35549
02/06/2008 09:12:31 SSL: ssl_helper[19406]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:31 SSL: accept_openssl: cookie from ssl_helper FAILED. 35
02/06/2008 09:12:31 SSL: BUT WAIT! HTTPS for helper process succeeded. Good.
02/06/2008 09:12:32 httpd: get 'VncViewer.jar' for 127.0.0.1
02/06/2008 09:12:33 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:33 SSL: spawning helper process to handle: 192.168.2.2:35550
02/06/2008 09:12:33 SSL: ssl_helper[19409]: SSL_accept() succeeded for: 192.168.2.2:35550
02/06/2008 09:12:33 SSL: ssl_helper[19409]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:33 SSL: accept_openssl: cookie from ssl_helper FAILED. 35
02/06/2008 09:12:33 SSL: BUT WAIT! HTTPS for helper process succeeded. Good.
02/06/2008 09:12:33 httpd: get 'VncViewer.jar' for 127.0.0.1
02/06/2008 09:12:35 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:35 SSL: spawning helper process to handle: 192.168.2.2:35551
02/06/2008 09:12:35 SSL: ssl_helper[19412]: SSL_accept() succeeded for: 192.168.2.2:35551
02/06/2008 09:12:35 SSL: ssl_helper[19412]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:35 Handling Check HTTPS request via https GET. [19412]
02/06/2008 09:12:35 -- GET /check.https.proxy.connection HTTP/1.1
Pragma: No-Cache
Proxy-Connection: Keep-Alive
Cache-Control: no-cache
User-Agent: Mozilla/4.0 (Linux 2.4.32) Java/1.5.0_06
Host: haystack:5900
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-type: application/x-www-form-urlencoded
Cookie:  


02/06/2008 09:12:35 SSL: accept_openssl: cookie from ssl_helper FAILED. 35
02/06/2008 09:12:35 SSL: BUT WAIT! HTTPS for helper process succeeded. Good.
02/06/2008 09:12:35 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:35 SSL: spawning helper process to handle: 192.168.2.2:35552
02/06/2008 09:12:35 SSL: ssl_helper[19413]: SSL_accept() *FATAL: -1 SSL FAILED
02/06/2008 09:12:35 SSL: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
02/06/2008 09:12:35 SSL: accept_openssl: cookie from ssl_helper FAILED. 0
02/06/2008 09:12:36 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:36 SSL: spawning helper process to handle: 192.168.2.2:35553
02/06/2008 09:12:36 SSL: ssl_helper[19414]: SSL_accept() *FATAL: -1 SSL FAILED
02/06/2008 09:12:36 SSL: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
02/06/2008 09:12:36 SSL: accept_openssl: cookie from ssl_helper FAILED. 0
02/06/2008 09:12:37 SSL: accept_openssl(OPENSSL_VNC)
02/06/2008 09:12:37 SSL: spawning helper process to handle: 192.168.2.2:35554
02/06/2008 09:12:37 SSL: ssl_helper[19415]: SSL_accept() succeeded for: 192.168.2.2:35554
02/06/2008 09:12:37 SSL: ssl_helper[19415]: accepted client 192.168.2.2 x509 peer cert is null
02/06/2008 09:12:45 SSL: handshake with helper process succeeded.
02/06/2008 09:12:45   other clients:
02/06/2008 09:12:45 Disabled X server key autorepeat.
02/06/2008 09:12:45   to force back on run: 'xset r on' (3 times)
02/06/2008 09:12:45 copy_tiles: allocating first_line at size 61
02/06/2008 09:12:46 Client Protocol Version 3.7
02/06/2008 09:12:46 Protocol version sent 3.7, using 3.7
02/06/2008 09:12:46 rfbProcessClientSecurityType: executing handler for type 1
02/06/2008 09:12:46 Using image quality level 6 for client 192.168.2.2
02/06/2008 09:12:46 Enabling X-style cursor updates for client 192.168.2.2
02/06/2008 09:12:46 Enabling full-color cursor updates for client 192.168.2.2
02/06/2008 09:12:46 Enabling cursor position updates for client 192.168.2.2
02/06/2008 09:12:46 Enabling LastRect protocol extension for client 192.168.2.2
02/06/2008 09:12:46 Enabling NewFBSize protocol extension for client 192.168.2.2
02/06/2008 09:12:46 Using tight encoding for client 192.168.2.2
02/06/2008 09:12:47 Pixel format for client 192.168.2.2:
02/06/2008 09:12:47   32 bpp, depth 24, little endian
02/06/2008 09:12:47   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
02/06/2008 09:12:47 no translation needed
02/06/2008 09:12:48 client 1 network rate 85.5 KB/sec (2183.5 eff KB/sec)
02/06/2008 09:12:48 client 1 latency:  52.2 ms
02/06/2008 09:12:48 dt1: 0.0201, dt2: 0.4751 dt3: 0.0522 bytes: 40119
02/06/2008 09:12:48 link_rate: LR_BROADBAND - 52 ms, 85 KB/s
02/06/2008 09:13:10 client_count: 0
02/06/2008 09:13:10 Restored X server key autorepeat to: 1
02/06/2008 09:13:10 sending SIGTERM to ssl_helper_pid: 19415
02/06/2008 09:13:10 viewer exited.
02/06/2008 09:13:10 deleted 60 tile_row polling images.