SourceForge has been redesigned. Learn more.
Close

#4 Ctrl+c keys do not get released in following scenario

closed
nobody
None
5
2004-06-07
2004-03-04
Shashank
No

I am using x11vnc server on my linux box and TightVNC
viewer with Tight encoding on my WinXP box.

In XP I use Ctrl+c and Ctrl+v combination for copy paste
operations in my local applications.

If by mistake the viewer window remains in focus then
session gets terminated and ctrl+c keys on linux box do
not get released, as a result the window on linux box
starts scrolling continuously with command prompts (for
example open shell on linux box and press ctrl+c
continuously. The same thing appears in this scenario
automatically) till I go there and press Ctrl key.

Discussion

  • Johannes Schindelin

    • status: open --> wont-fix-rejected
     
  • Johannes Schindelin

    Logged In: YES
    user_id=27066

    The problem here, evidently, is that the Ctrl+C means "stop
    this program", and the focus on the X11 Server is still on
    the Terminal in which x11vnc was started to begin with.

    I'd rather start x11vnc via putty or at least make sure when
    I press Ctrl+C that the focus is on the right window (this
    helps when you don't want to copy random text, but the one
    you wanted to mark).

     
  • Shashank

    Shashank - 2004-03-17
    • status: wont-fix-rejected --> wont-fix
     
  • Shashank

    Shashank - 2004-03-17

    Logged In: YES
    user_id=990119

    I agree with your comments. My only concern was Ctrl key
    not getting released in this scenario.

    If I press ctrl+c by mistake; the shell in focus starts scrolling
    continuously.

    Just passing Ctrl up event in this scenario will solve all my
    problem.

     
  • Johannes Schindelin

    • status: wont-fix --> open
     
  • Johannes Schindelin

    Logged In: YES
    user_id=27066

    Okay, I have to look into it: I have to catch a signal in
    that case and look if there were pressed keys; in that case
    they have to be released. Maybe that's easy, maybe not.

     
  • Karl J. Runge

    Karl J. Runge - 2004-04-20

    Logged In: YES
    user_id=219571

    Are you saying pressing Ctrl+c once in the vncviewer causes
    an un-ending sequence of Ctrl+c's in the remote linux terminal
    window? I cannot reproduce this. I just get one Ctrl+c sent.

    Please provide more details to reproduce.

    Do the vncviewer and x11vnc processes persist? What happens
    if you terminate one or the other?

     
  • Shashank

    Shashank - 2004-04-22

    Logged In: YES
    user_id=990119

    Here is the exact scenario...
    1. Open shell on linux box and type ./x11vnc to start
    vncserver.
    2. From Windows launch VNCViewer and connect to linux box.
    3. Press Ctrl+c

    As the shell from which we launched vnc is in focus with
    Ctrl+c, session will get closed and as you pointed out rightly
    the un-ending sequence of Ctrl+c's will start.

     
  • Johannes Schindelin

    • status: open --> closed
     
  • Johannes Schindelin

    Logged In: YES
    user_id=27066

    After pondering this problem: There cannot be a solution. It
    is not my fault that Microshaft in its endless wisdom
    decided to take the shortcut Ctrl+C, which they themselves
    used for years to stop the process in MSDOS, and use it for
    something completely different.

    I will NOT try to block Ctrl+C, as this is exactly what I
    use sometimes to stop a runaway process.

    The only solution here, which I can see, is to use the
    program differently. Either start x11vnc from an SSH
    connection ("DISPLAY=:0 x11vnc") or minimize the terminal
    which runs x11vnc.

    I call this bug closed.

     
  • Karl J. Runge

    Karl J. Runge - 2004-06-08

    Logged In: YES
    user_id=219571

    > Date: 2004-06-07 16:13
    > Sender: dscho
    > Logged In: YES
    > user_id=27066
    >
    > After pondering this problem: There cannot be a solution. It
    > is not my fault that Microshaft in its endless wisdom
    > decided to take the shortcut Ctrl+C, which they themselves
    > used for years to stop the process in MSDOS, and use it for
    > something completely different.
    >
    > I will NOT try to block Ctrl+C, as this is exactly what I
    > use sometimes to stop a runaway process.
    >
    > The only solution here, which I can see, is to use the
    > program differently. Either start x11vnc from an SSH
    > connection ("DISPLAY=:0 x11vnc") or minimize the terminal
    > which runs x11vnc.
    >
    > I call this bug closed.

    Well, wait a minute. Just in the last few days I've put
    some special handling in x11vnc (not libvncserver) to handle
    some of this problem. (in some hard terminations of x11vnc
    during testing, I was having Ctrl modifier "stuck" down,
    and wanted to put something to manage this better)

    The handling comes in two ways:

    - By default if x11vnc receives SIGINT (i.e. Ctrl-C)
    it will send all of the (non-Lock) modifiers
    KeyRelease before exiting.

    - As an option, user can supply -clear_mods, which
    will cause the same KeyRelease's to happen both at
    program start and exit.

    I don't have this in CVS yet, but it is at:

    http://www.karlrunge.com/x11vnc/x11vnc.c

    (can be dropped into a libvncserver tree) if Shashank still
    wants to try it out. I'd appreciate knowing if it works
    for his case, as it difficult for me to test it.

    I reserve the right to drop the first one if it starts
    breaking people, but the 2nd one will remain.

    Karl