Bug 3356

Summary: press “ctrl+c” in vncviewer lead to standard input(keyboard) doesn't work correctly when running x11vnc by terminal
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hongxu Jia <hongxu.jia>
Component: graphicsAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, meta.mr.watcher, meta.watcher, Qi.Chen, sgw, yi.zhao
Version: 1.4   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
On target, open a terminal to run command "x11vnc -display :0.0"
none
On host, open a terminal to run “vncviewer” to create a virtual X desktop of target
none
In this virtual X desktop, find the terminal which running x11vnc and press “ctrl+c”. the standard input of terminal in X desktop is abnormal none

Description Hongxu Jia 2012-10-30 09:36:10 UTC
Testing Environment
===============================
Host: qemuarm sato/sdk
Kernel: 
Image location: http://autobuilder.pokylinux.org/nightly/20121024-1/machines/qemu/qemuarm/


Steps
===============================
1. Boot up the qemuarm with sato/sdk image
2. On target, open a terminal to run command "x11vnc -display :0.0", target IP is "192.168.7.2"
3. On host, open a terminal to run “vncviewer 192.168.7.2:0” to create a virtual X desktop of target
4. In this virtual X desktop, find the terminal which running x11vnc and press “ctrl+c”.

Observed Result
===============================
1. On Target, the standard input of terminal in X desktop is abnormal, you cannot input correctly from keyboard.
Comment 1 Hongxu Jia 2012-10-30 09:40:38 UTC
Created attachment 909 [details]
On target, open a terminal to run command "x11vnc -display :0.0"
Comment 2 Hongxu Jia 2012-10-30 09:41:42 UTC
Created attachment 910 [details]
On host, open a terminal to run “vncviewer” to create a virtual X desktop of target
Comment 3 Hongxu Jia 2012-10-30 09:43:05 UTC
Created attachment 911 [details]
In this virtual X desktop, find the terminal which running x11vnc and press “ctrl+c”. the standard input of terminal in X desktop is abnormal
Comment 4 liang li 2012-10-30 09:55:40 UTC
if reboot qemuarm , the terminal can work again. 
maybe actions are abnormal to the x11vnc.
Comment 5 Laurentiu Palcu 2012-11-07 11:12:57 UTC
The problem happens because the CTRL key, which was sent to the target via the VNC session when typing CTRL+C, is signalled as still pressed after the vnc server is killed... x11vnc offers a command line option to work around this kind of issues: -clear_mods. So, all you have do is start the vnc server like this:

x11vnc -display .0:0 -clear_mods

This way the modifier keys will be reset when the server is killed.

One other way to work around this is to press the CTRL key again in the target terminal. After that, everything gets back to normal.

So, there's nothing to fix here.