Bug 569830 - virt-manager: vnc grabs keyboard, blocks host screen saver
Summary: virt-manager: vnc grabs keyboard, blocks host screen saver
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-screensaver
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 573045 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-02 14:54 UTC by solanum
Modified: 2012-12-07 13:28 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 710966 (view as bug list)
Environment:
Last Closed: 2012-08-16 22:17:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description solanum 2010-03-02 14:54:13 UTC
I reported it for F12. It is the most annoying on the i686 laptop but my
desktop x64 has the same issue (both F12).  

It is =really= bad when you have a qemu virtual machine console running in the
foreground.  The screensaver won't kick in until you click on a window outside
of the console session. IE you can work in the qemu vm console walk away for an
hour and if the qemu console was in the foreground the qemu session is still
active. (if it isnt the screensaver usually kicks in.)  The screensaver won't
kick in until you click on a window outside the console. Once you click on
something outside the qemu session it immediately kicks in. (this is all with
the default gnome desktop.)    

[reply] [-] Comment 62 Tim Taiwanese Liim 2010-03-01 22:17:00 EST

Solanum,
I ran qemu console and indeed I reproduced the issue you described.  I
see this as a design conflict, not a g-ss issue, though.  When you
click on the qemu vm console, it grabs the input (mouse and keyboard):
    Pointer grabbed
    The mouse pointer has been restricted to the
    virtual console window.  To release the pointer, 
    press the key pair: Ctrl+Alt
When g-ss activates, it also tries to grab the input, but could not:
    [gs_grab_get_keyboard] gs-grab-x11.c:171 (20:32:26): 
                Grabbing keyboard widget=2800003
    [gs_grab_get_keyboard] gs-grab-x11.c:186 (20:32:26): 
                Couldn't grab keyboard!  (AlreadyGrabbed)

So here is the conflict: both qemu vm console and g-ss want to grab
input, but only one can do it; and since g-ss is the 2nd one, g-ss
will not get the grab, thus no lock.  Good news for my LCD backlight
is, g-p-m (gnome-power-manager) does not require grab, so it turns off
my LCD backlight on time, although this does not help my laptop
security.

Can you live with vnc access to the vm?  vnc will not do the grab, so
g-ss will work as usual.

--
I believe this also happened on the local machine when opening up a virt-manager console connected acrossed the network to a remote vm stack using the vnc+ssh (default) connection between the libvirt managers.

Comment 1 Daniel Berrangé 2010-03-04 09:06:18 UTC
I don't see that there's anything we can do in virt-manager. We have no choice but to grab the keyboard & mouse when using guest VNC consoles without a USB Tablet / other absolute mouse pointer. I'd expect the screensaver/screenlock to be able to override any other application's active mouse / keyboard grabs when it tries to activate. Re-assigning to g-s-s

Comment 2 Tim Taiwanese Liim 2010-03-05 05:11:36 UTC
Daniel,
Thanks for fast response!

> I'd expect the screensaver/screenlock to be able to override any
> other application's active mouse / keyboard grabs

Could you explain how this can be done?  Assume app#1 already uses
XGrabKeyboard for a grab; now app#2 tries to steal the grab by
XGrabKeyboard?  But man page of XGrabKeyboard says
    If the keyboard is actively grabbed by some other client,
    XGrabKeyboard fails and returns AlreadyGrabbed.
So how will app#2 steals the grab?

Comment 3 solanum 2010-03-05 16:38:56 UTC
I'm still not convinced the screensaver should be dependent upon XGrabKeyboard if it is used as a "security measure". 

It really means ANY application can grab the keyboard and prevent the screensaver from loading or it loads its own "fake" screensaver to steal your password. 

Should this really be dependent on the application writers in this case libvirt to "do the right thing"? It seems like it should be handled at a lower level to prevent mis-use. 

I have the same expectations as daniel: 

> I'd expect the screensaver/screenlock to be able to override any
> other application's active mouse / keyboard grabs

Comment 4 Daniel Berrangé 2010-03-05 16:51:19 UTC
I don't know how gnome-screensaver can implement what it needs, but I am sure that other applications like virt-manager should not need to be modified to take account/be aware of g-ss's needs.

Comment 5 Daniel Berrangé 2010-03-15 11:36:30 UTC
*** Bug 573045 has been marked as a duplicate of this bug. ***

Comment 6 Bug Zapper 2010-11-03 20:57:56 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2010-12-03 22:08:23 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Sam Brightman 2010-12-29 12:35:10 UTC
This bug should be reopened and renamed; it also affects Fedora 13 and is more general than just with VMs. It also occurs using synergy for input device sharing, or according to some Ubuntu bug reports when certain menus are left open. It is a security issue, and WONTFIX is correct for virt-manager but almost certainly not for gnome-screensaver.

Comment 9 Bug Zapper 2011-06-02 16:21:01 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Cole Robinson 2011-06-07 16:07:52 UTC
Pretty sure still relevant for f14

Comment 11 Fedora Admin XMLRPC Client 2011-06-21 16:00:19 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 Fabrice Bellet 2011-09-07 14:40:49 UTC
Same problem when using a VNC session in vinagre (Fedora 15)

Comment 13 Fedora End Of Life 2012-08-16 22:17:56 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 14 Peter Hutterer 2012-08-17 00:35:33 UTC
fwiw, this is an X issue that only Grab Override can solve. Unfortunately, that's stalled, it's tricky.

http://fedoraproject.org/wiki/Features/Grab_override


Note You need to log in before you can comment on or make changes to this bug.