Bug 4110

Summary: when close vncviewer, qemu's vncserver process(x11vnc) automated killed itself.
Product: [Runtime] General Runtime Reporter: Ning Zhang <ning.zhang>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Low CC: hongxu.jia, kai.kang, liezhi.yang, Qi.Chen, richard.purdie, yi.zhao
Version: 1.4   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ning Zhang 2013-03-26 09:11:35 UTC
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20130321-2/

Branch: poky/master
Git rev: 9ffee9add2d0380f4025e7a678a166f25a7d659e

Test steps:
1. start a qemuarm-sato, start vncserver on it by execute "x11vnc -display :0.0"
2. start a vncviewer from local host. e.g. "vncviewer 192.168.7.2:0"
3. close the vncviewer
4. the vncserver on qemu is automated killed.

Normally, a vncviewer open or close, should not impact the vncserver. On a real linux host, when we setup a vncserver, and laungh a vncviewer to it from other host, it could not impact the server, even if the viewer leave.

So i think x11vnc should have the same behavior, which is: when vncviewer leave, the server still alive.


==========log on qemu when exit the vnc viewer=============

26/03/2013 08:56:21 cursor_noshape_updates_clients: 0
26/03/2013 08:56:24 cursor_noshape_updates_clients: 0
26/03/2013 08:56:29 client_count: 0
26/03/2013 08:56:29 Restored X server key autorepeat to: 1
26/03/2013 08:56:29 viewer exited.
26/03/2013 08:56:29 deleted 20 tile_row polling images.
sh-4.2#
sh-4.2#
Comment 1 Saul Wold 2013-08-21 20:47:10 UTC
Finally spent some time with this issue today and placed it under the debugger 
and also looked at the documentation of x11vnc.  It states the following:

-once                  Exit after the first successfully connected viewer
                       disconnects, opposite of -forever. This is the Default.

Notice this is default, the correct parameter would be -forever to get the 
behavior your talking about. So I think the default of x11vnc should be kept.

-shared                VNC display is shared, i.e. more than one viewer can
                       connect at the same time (default off).
-once                  Exit after the first successfully connected viewer
                       disconnects, opposite of -forever. This is the Default.
-forever               Keep listening for more connections rather than exiting
                       as soon as the first client(s) disconnect. Same as -many

                       To get the standard non-shared VNC behavior where when
                       a new VNC client connects the existing VNC client is
                       dropped use:  -nevershared -forever   This method can
                       also be used to guard against hung TCP connections that
                       do not go away.