GNU bug report logs - #36900
key-mon crashes on launch

Previous Next

Package: guix;

Reported by: Jesse Gibbons <jgibbons2357 <at> gmail.com>

Date: Fri, 2 Aug 2019 22:42:01 UTC

Severity: normal

To reply to this bug, email your comments to 36900 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Fri, 02 Aug 2019 22:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jesse Gibbons <jgibbons2357 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 02 Aug 2019 22:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jesse Gibbons <jgibbons2357 <at> gmail.com>
To: bug-guix mailing list <bug-guix <at> gnu.org>
Subject: key-mon crashes on launch
Date: Fri, 02 Aug 2019 16:40:53 -0600
1. install key-mon
2. run key-mon
it crashes:

(.key-mon-real:5006): Gtk-WARNING **: 16:23:06.088: Unable to locate
theme engine in module_path: "adwaita",

(.key-mon-real:5006): Gtk-WARNING **: 16:23:06.092: Unable to locate
theme engine in module_path: "adwaita",
Traceback (most recent call last):
  File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
1.17/bin/.key-mon-real", line 3, in <module>
    km.main()
  File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 1032, in main
    keymon = KeyMon(opts)
  File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 130, in
__init__
    self.devices = xlib.XEvents()
  File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
1.17/lib/python2.7/site-packages/keymon/xlib.py", line 80, in __init__
    self.record_display = display.Display()
  File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
0.14/lib/python2.7/site-packages/Xlib/display.py", line 85, in __init__
    self.display = _BaseDisplay(display)
  File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
0.14/lib/python2.7/site-packages/Xlib/display.py", line 67, in __init__
    apply(protocol.display.Display.__init__, (self, ) + args, keys)
  File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
0.14/lib/python2.7/site-packages/Xlib/protocol/display.py", line 121,
in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":1": No
protocol specified



One possible reason it crashes is the python2-xlib is far outdated. The
package was added in patch db62afa55ad443cc50bcafe64eb3ba239eae9c11
(2015) and has been version 0.14 ever since. The website says it has
been migrated to github, which says the most recent stable release is
0.25. It looks like there is a similar issue (though not identical) htt
ps://github.com/python-xlib/python-xlib/issues/53 which was fixed.

I will see if updating python2-xlib fixes this, and if so I will send a
patch.

Any objections?

-- 
-Jesse




Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Fri, 02 Aug 2019 23:22:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: bug-guix <at> gnu.org
Cc: 36900 <at> debbugs.gnu.org
Subject: Re: bug#36900: key-mon crashes on launch
Date: Sat, 03 Aug 2019 01:21:08 +0200
[Message part 1 (text/plain, inline)]
Jesse,

Jesse Gibbons 写道:
> I will see if updating python2-xlib fixes this, and if so I will 
> send a
> patch.
>
> Any objections?

On the contrary.  That's exactly what we want!

Thanks,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Fri, 02 Aug 2019 23:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sat, 03 Aug 2019 01:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: Jesse Gibbons <jgibbons2357 <at> gmail.com>
To: 36900 <at> debbugs.gnu.org
Subject: Re: bug#36900: key-mon crashes on launch
Date: Fri, 02 Aug 2019 19:54:00 -0600
On Fri, 2019-08-02 at 16:40 -0600, Jesse Gibbons wrote:
> 1. install key-mon
> 2. run key-mon
> it crashes:
> 
> (.key-mon-real:5006): Gtk-WARNING **: 16:23:06.088: Unable to locate
> theme engine in module_path: "adwaita",
> 
> (.key-mon-real:5006): Gtk-WARNING **: 16:23:06.092: Unable to locate
> theme engine in module_path: "adwaita",
> Traceback (most recent call last):
>   File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
> 1.17/bin/.key-mon-real", line 3, in <module>
>     km.main()
>   File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
> 1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 1032, in
> main
>     keymon = KeyMon(opts)
>   File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
> 1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 130, in
> __init__
>     self.devices = xlib.XEvents()
>   File "/gnu/store/jkjmj9l72rmnh642dyprnpwgmz4mn6cx-key-mon-
> 1.17/lib/python2.7/site-packages/keymon/xlib.py", line 80, in
> __init__
>     self.record_display = display.Display()
>   File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
> 0.14/lib/python2.7/site-packages/Xlib/display.py", line 85, in
> __init__
>     self.display = _BaseDisplay(display)
>   File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
> 0.14/lib/python2.7/site-packages/Xlib/display.py", line 67, in
> __init__
>     apply(protocol.display.Display.__init__, (self, ) + args, keys)
>   File "/gnu/store/4xl1xl2fp6c0c9f9pm1xm10x1qgbwp08-python2-xlib-
> 0.14/lib/python2.7/site-packages/Xlib/protocol/display.py", line 121,
> in __init__
>     raise error.DisplayConnectionError(self.display_name, r.reason)
> Xlib.error.DisplayConnectionError: Can't connect to display ":1": No
> protocol specified
> 
> 
> 
> One possible reason it crashes is the python2-xlib is far outdated.
> The
> package was added in patch db62afa55ad443cc50bcafe64eb3ba239eae9c11
> (2015) and has been version 0.14 ever since. The website says it has
> been migrated to github, which says the most recent stable release is
> 0.25. It looks like there is a similar issue (though not identical)
> htt
> ps://github.com/python-xlib/python-xlib/issues/53 which was fixed.
> 
> I will see if updating python2-xlib fixes this, and if so I will send
> a
> patch.
> 
> Any objections?
> 

Updating python2-xlib does not fix this bug.
-- 
-Jesse




Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sun, 03 Jan 2021 21:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: Alexandros Theodotou <alex <at> zrythm.org>
To: 36900 <at> debbugs.gnu.org
Subject: key-mon crashes on launch
Date: Sun, 03 Jan 2021 21:16:38 +0000
Just FYI this is still broken.

Thanks,
Alex





Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sun, 03 Jan 2021 21:59:02 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Alexandros Theodotou <alex <at> zrythm.org>
Cc: 36900 <at> debbugs.gnu.org, bug-guix <at> gnu.org
Subject: Re: bug#36900: key-mon crashes on launch
Date: Sun, 03 Jan 2021 22:58:47 +0100
[Message part 1 (text/plain, inline)]
Alexandros Theodotou 写道:
> Just FYI this is still broken.

I don't understand how you are reproducing this backtrace:

 $ guix environment key-mon --ad-hoc key-mon -- key-mon
 Error: Missing xlib, run sudo apt-get install python-xlib
 $ sudo apt-get install python-xlib
 sudo: apt-get: command not found

It was worth a try.

How are you launching key-mon?  Is this because I'm not using X?

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sun, 03 Jan 2021 21:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sun, 03 Jan 2021 22:21:01 GMT) Full text and rfc822 format available.

Message #26 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: Alexandros Theodotou <alex <at> zrythm.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 36900 <at> debbugs.gnu.org
Subject: Re: bug#36900: key-mon crashes on launch
Date: Sun, 03 Jan 2021 22:20:41 +0000
Hi Tobias,

On Sun, 2021-01-03 at 22:58 +0100, Tobias Geerinckx-Rice wrote:
> guix environment key-mon --ad-hoc key-mon -- key-mon


I tried the command above and this is my output.
```
substitute: updating substitutes from 'https://ci.guix.gnu.org'...
100.0%
1.7 MB will be downloaded
downloading from 
https://ci.guix.gnu.org/nar/lzip/kffsg08xjyzvxddldyqc2xfhiflsk0y6-python2-pygtk-2.24.0-doc
...
 python2-pygtk-2.24.0-
doc  776KiB                                                            
                                                                       
                                1.4MiB/s 00:01 [##################]
100.0%

The following derivation will be built:
   /gnu/store/mxpnh35lkla14p5f8al3s6vl2sh2w0cd-profile.drv

applying 16 grafts for /gnu/store/p35rw37wg8za9ygwv2q24lcg6a855rw4-
python2-pygtk-2.24.0.drv ...
building CA certificate bundle...
building fonts directory...
generating GLib schema cache...
creating GTK+ icon theme cache...
building cache files for GTK+ input methods...
building directory of Info manuals...
building database for manual pages...
building XDG desktop file cache...
building XDG MIME database...
building profile with 60 packages...

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.432: Unable to locate
theme engine in module_path: "adwaita",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.434: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.434: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.434: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.435: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.435: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.435: Unable to locate
theme engine in module_path: "murrine",

(.key-mon-real:15064): Gtk-WARNING **: 22:14:36.435: Unable to locate
theme engine in module_path: "murrine",
Traceback (most recent call last):
  File "/gnu/store/fwmb620wk7hadj0iqh8xrxs8a74xhw50-key-mon-
1.17/bin/.key-mon-real", line 3, in <module>
    km.main()
  File "/gnu/store/fwmb620wk7hadj0iqh8xrxs8a74xhw50-key-mon-
1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 1032, in main
    keymon = KeyMon(opts)
  File "/gnu/store/fwmb620wk7hadj0iqh8xrxs8a74xhw50-key-mon-
1.17/lib/python2.7/site-packages/keymon/key_mon.py", line 130, in
__init__
    self.devices = xlib.XEvents()
  File "/gnu/store/fwmb620wk7hadj0iqh8xrxs8a74xhw50-key-mon-
1.17/lib/python2.7/site-packages/keymon/xlib.py", line 80, in __init__
    self.record_display = display.Display()
  File "/gnu/store/ccnd7dx7c1g64mrdhml7vg8qmf65fd67-python2-xlib-
0.27/lib/python2.7/site-packages/Xlib/display.py", line 89, in __init__
    self.display = _BaseDisplay(display)
  File "/gnu/store/ccnd7dx7c1g64mrdhml7vg8qmf65fd67-python2-xlib-
0.27/lib/python2.7/site-packages/Xlib/display.py", line 71, in __init__
    protocol_display.Display.__init__(self, *args, **keys)
  File "/gnu/store/ccnd7dx7c1g64mrdhml7vg8qmf65fd67-python2-xlib-
0.27/lib/python2.7/site-packages/Xlib/protocol/display.py", line 166,
in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":1": No
protocol specified
```

I get the same error when i launch it as `key-mon` from the console,
after I installed the package.

I tried with `--pure` now and I get your error:
```
No protocol specified
/gnu/store/mzwxwalqni35m1m37xb5qvd0mv1g3sp9-python2-pygtk-
2.24.0/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57:
GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Error: Missing xlib, run sudo apt-get install python-xlib
```

> $ sudo apt-get install python-xlib
>  sudo: apt-get: command not found

Lol.

Thanks,
Alex





Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sat, 09 Jan 2021 14:50:01 GMT) Full text and rfc822 format available.

Message #29 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: Alexandros Theodotou <alex <at> zrythm.org>
To: 36900 <at> debbugs.gnu.org
Subject: Re: bug#36900: key-mon crashes on launch
Date: Sat, 09 Jan 2021 14:49:30 +0000
Some things discovered on IRC:

"works for me with [patch below] and by running: $ ./pre-inst-env guix
environment --ad-hoc key-mon gdk-pixbuf+svg --pure -- $(which bash) -c
'DISPLAY=:0 key-mon'"

"figuring out where to propagate gdk-pixbuf+svg remains to be found"

```patch
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 23e43b7e75..c418a9c7e0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8046,8 +8046,9 @@ falling into the Python interpreter.")
     (native-inputs
      `(("python-mock" ,python-mock)
        ("python-setuptools-scm" ,python-setuptools-scm)
-       ("python-six" ,python-six)
        ("xorg-server" ,xorg-server)))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (home-page "https://github.com/python-xlib/python-xlib")
     (synopsis "Python X11 client library")
     (description
```

FYI, the python-screenkey patch also has a similar issue, this could be
it.

Thanks,
Alex





Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sat, 14 Aug 2021 20:36:01 GMT) Full text and rfc822 format available.

Message #32 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: "36900 <at> debbugs.gnu.org" <36900 <at> debbugs.gnu.org>
Subject: Re: key-mon crashes on launch
Date: Sat, 14 Aug 2021 20:34:50 +0000
Are there any updates on this, did anyone get it to work? I just tried with the same issue on opening display for me too.

I'm seeing the same thing in trying to package autokey, but with the error displayed in a graphical window on the X server (and yet it says it doesn't know the protocol). This also uses python-xlib, gtk, etc.

Thanks,
John




Information forwarded to bug-guix <at> gnu.org:
bug#36900; Package guix. (Sat, 14 Aug 2021 20:41:02 GMT) Full text and rfc822 format available.

Message #35 received at 36900 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: "36900 <at> debbugs.gnu.org" <36900 <at> debbugs.gnu.org>
Subject: Re: key-mon crashes on launch
Date: Sat, 14 Aug 2021 20:40:32 +0000
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Saturday, August 14th, 2021 at 4:34 PM, John Kehayias wrote:

> Are there any updates on this, did anyone get it to work? I just tried with the same issue on opening display for me too.
>
> I'm seeing the same thing in trying to package autokey, but with the error displayed in a graphical window on the X server (and yet it says it doesn't know the protocol). This also uses python-xlib, gtk, etc.
>

Of course immediatly after I found a workaround, for key-mon and my case: allow all to connect to X with `xhost +`. Certainly not the ideal thing to do as it disables authentication with X, but show the problem.

Does anyone know the proper way to deal with this for these python packages?




This bug report was last modified 3 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.