ports/103395: gnome-ssh-askpass interferes with gnome-screensaver

Vladimir Grebenschikov vova at fbsd.ru
Tue Sep 19 06:40:24 UTC 2006


>Number:         103395
>Category:       ports
>Synopsis:       gnome-ssh-askpass interferes with gnome-screensaver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 19 06:40:22 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Grebenschikov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
SWsoft 
>Environment:


System: FreeBSD 7.0-CURRENT #8: Sat Sep  2 01:16:05 MSD 2006
    root at vbook.fbsd.ru:/usr/obj/usr/src/sys/VBOOK



>Description:


If screen-saver activated while gnome-ssh-askpass is active, after unlock I have non-functional pointer in X.
Actualy pointer moves but it is impossible to click anywhere. All clicks do not work (Left, Right, Middle, Wheel, with Shift/Alt/Meta)

I am not completely sure it interfere with gnome-screensaver or with Xserver screen-saver - both active.

I have fresn 7-CURRENT, with fresh prorts tree.

I have sliding focus (if it does matter).


>How-To-Repeat:


Intslall security/gnome-ssh-askpass
Setup to run ssh-add on startup with SSH_ASKPASS=gnome-ssh-askpass2
You should have generated key with passphrase in you .ssh directory.
(I've added it into session startup programs)

Enable gnome-screensaver.

Enable Xserver screensaver (just for sure), part of xorg.conf:
Section "ServerFlags"
        Option   "blank time"    "10"
        Option   "standby time"  "20"
        Option   "suspend time"  "30"
        Option   "off time"      "60"
EndSection

Login and wait until gnome screensaver locks screen.
Unlock screen, enter passphrase. 

Then try to click somewhere by mouse - it does not work.
Focus do not changed by mouse.
Any usual keyboard clicks - works.



>Fix:


I have no good fix, but turning off grabbing keyboard from gnome-ssh-askpass looks like help me:

/usr/ports/security/gnome-ssh-askpass# cvs diff files/patch-grab-keyboard 
Index: files/patch-grab-keyboard
===================================================================
RCS file: files/patch-grab-keyboard
diff -N files/patch-grab-keyboard
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/patch-grab-keyboard   19 Sep 2006 06:06:35 -0000
@@ -0,0 +1,58 @@
+--- contrib/gnome-ssh-askpass2.c.orig  Tue Sep 19 09:58:45 2006
++++ contrib/gnome-ssh-askpass2.c       Tue Sep 19 10:03:27 2006
+@@ -88,12 +88,13 @@
+ {
+       const char *failed;
+       char *passphrase, *local;
+-      int result, grab_tries, grab_server, grab_pointer;
++      int result, grab_tries, grab_server, grab_pointer, grab_keyboard;
+       GtkWidget *dialog, *entry;
+       GdkGrabStatus status;
+ 
+       grab_server = (getenv("GNOME_SSH_ASKPASS_GRAB_SERVER") != NULL);
+       grab_pointer = (getenv("GNOME_SSH_ASKPASS_GRAB_POINTER") != NULL);
++      grab_keyboard = (getenv("GNOME_SSH_ASKPASS_GRAB_KEYBOARD") != NULL);
+       grab_tries = 0;
+ 
+       dialog = gtk_message_dialog_new(NULL, 0,
+@@ -135,17 +136,21 @@
+                       }
+               }
+       }
+-      for(;;) {
+-              status = gdk_keyboard_grab((GTK_WIDGET(dialog))->window,
+-                 FALSE, GDK_CURRENT_TIME);
+-              if (status == GDK_GRAB_SUCCESS)
+-                      break;
+-              usleep(GRAB_WAIT * 1000);
+-              if (++grab_tries > GRAB_TRIES) {
+-                      failed = "keyboard";
+-                      goto nograbkb;
++
++      if (grab_keyboard) {
++              for(;;) {
++                      status = gdk_keyboard_grab((GTK_WIDGET(dialog))->window,
++                         FALSE, GDK_CURRENT_TIME);
++                      if (status == GDK_GRAB_SUCCESS)
++                              break;
++                      usleep(GRAB_WAIT * 1000);
++                      if (++grab_tries > GRAB_TRIES) {
++                              failed = "keyboard";
++                              goto nograbkb;
++                      }
+               }
+       }
++
+       if (grab_server) {
+               gdk_x11_grab_server();
+       }
+@@ -157,7 +162,8 @@
+               XUngrabServer(GDK_DISPLAY());
+       if (grab_pointer)
+               gdk_pointer_ungrab(GDK_CURRENT_TIME);
+-      gdk_keyboard_ungrab(GDK_CURRENT_TIME);
++      if (grab_keyboard)
++              gdk_keyboard_ungrab(GDK_CURRENT_TIME);
+       gdk_flush();
+ 
+       /* Report passphrase if user selected OK */
#


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list