X2Go Bug report logs - #989
pyhoca-gui fails to fall back to Gtk-2.0 notifications (pynotify)

version graph

Package: pyhoca-gui; Maintainer for pyhoca-gui is X2Go Developers <x2go-dev@lists.x2go.org>; Source for pyhoca-gui is src:pyhoca-gui.

Reported by: Ondřej Grover <ondrej.grover@gmail.com>

Date: Sun, 31 Jan 2016 08:05:02 UTC

Severity: normal

Found in version

Full log

🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#989: pyhoca-gui fails to fall back to Gtk-2.0 notifications (pynotify)
Reply-To: Ondřej Grover <ondrej.grover@gmail.com>, 989@bugs.x2go.org
Resent-From: Ondřej Grover <ondrej.grover@gmail.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Sun, 31 Jan 2016 08:05:02 +0000
Resent-Message-ID: <handler.989.B.14542274635333@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 989
X-X2Go-PR-Package: pyhoca-gui
Received: via spool by submit@bugs.x2go.org id=B.14542274635333
          (code B); Sun, 31 Jan 2016 08:05:02 +0000
Received: (at submit) by bugs.x2go.org; 31 Jan 2016 08:04:23 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.7 required=3.0 tests=BAYES_50,DKIM_SIGNED,
	autolearn=ham version=3.3.2
Received: from localhost (localhost [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 9BAA03BC4B
	for <submit@bugs.x2go.org>; Sun, 31 Jan 2016 09:04:21 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([])
	by localhost (ymir.das-netzwerkteam.de []) (amavisd-new, port 10024)
	with ESMTP id Z1kv2zUCFiy7 for <submit@bugs.x2go.org>;
	Sun, 31 Jan 2016 09:04:21 +0100 (CET)
Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id F1F1B3BC4A
	for <submit@bugs.x2go.org>; Sun, 31 Jan 2016 09:04:20 +0100 (CET)
Received: by mail-lf0-f53.google.com with SMTP id 78so30686569lfy.3
        for <submit@bugs.x2go.org>; Sun, 31 Jan 2016 00:04:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
X-Gm-Message-State: AG10YOQFY6R3jm0E2rgFvu7+2oAbN2IIhlX4kAg/0XWSNUtdwv/rarSeY+jcg8dyIw9eGTMm3cculs+HFeiMQg==
X-Received: by with SMTP id 37mr3680720lfu.53.1454227460406; Sun,
 31 Jan 2016 00:04:20 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Sun, 31 Jan 2016 00:04:01 -0800 (PST)
From: Ondřej Grover <ondrej.grover@gmail.com>
Date: Sun, 31 Jan 2016 09:04:01 +0100
Message-ID: <CAOyjJOKY4VpqcqKJ2St58tepAgKipgdc=TeGJtgsFpZf5qccdA@mail.gmail.com>
To: submit@bugs.x2go.org
Content-Type: multipart/alternative; boundary=001a113fbec83342bf052a9cb7c8
[Message part 1 (text/plain, inline)]
Package: pyhoca-gui

Dear maintainers,

I believe commit e44e848415eff3e4dab69e990adfc447e79143f8 which introduced
GTK3 notification support broke GTK2 notification support fallback. The
problem was not present in

I believe the problem lies in this import construct in
pyhoca/wxgui/notify.py which will fail the same way even when put alone in
a file

    from gi.repository import Notify as _Notify
except ImportError:
    import pynotify as _Notify

I think the problem is that even if the GTK3 Notify module is not
available, many GTK3 libraries get loaded and then the pynotify import
fails with

ImportError: could not import gobject (could not find _PyGObject_API object)

This is the same exception I see when running pyhoca-gui.

I think some more sophisticated GTK version selection mechanism is needed,
one that would not start loading conflicting libraries.

As a workaround for now I just removed that GTK3 import on my system.

My system is Debian 8.3 Jessie with the following (possibly relevant) gtk
packages installed

dpkg -l | grep '^.i.*gtk[23].*'

ii  libavahi-ui-gtk3-0:amd64               0.6.31-5
               amd64        Avahi GTK+ User interface library for GTK3
ii  libcanberra-gtk3-0:amd64               0.30-2.1
               amd64        GTK+ 3.0 helper for playing widget event sounds
with libcanberra
ii  libcanberra-gtk3-module:amd64          0.30-2.1
               amd64        translates GTK3 widgets signals to event sounds
ii  libdbusmenu-gtk3-4:amd64               12.10.2-1
                amd64        library for passing menus over DBus - GTK+
ii  libgirara-gtk3-1:amd64                 0.2.3-1
                amd64        library for minimalistic user interfaces
(shared libraries, GTK+ 3)
ii  libgtk2-ex-podviewer-perl              0.18-1
               all          Perl Gtk2 widget for displaying Plain Old
Documentation (POD)
ii  libgtk2-ex-simple-list-perl            0.50-2
               all          simple interface to Gtk2's complex MVC list
ii  libgtk2-imageview-perl                 0.05-2+b1
                amd64        Perl bindings for the GtkImageView image
viewer widget
ii  libgtk2-perl                           2:1.2492-4
               amd64        Perl interface to the 2.x series of the Gimp
Toolkit library
ii  libgtk2.0-0:amd64                      2.24.25-3
                amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                          2.24.25-3
                amd64        programs for the GTK+ graphical user interface
ii  libgtk2.0-common                       2.24.25-3
                all          common files for the GTK+ graphical user
interface library
ii  libwxgtk3.0-0:amd64                    3.0.2-1+b1
               amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+
ii  pinentry-gtk2                          0.8.3-2
                amd64        GTK+-2-based PIN or pass-phrase entry dialog
for GnuPG
ii  python-gtk2                            2.24.0-4
               amd64        Python bindings for the GTK+ widget set
ii  python-wxgtk3.0              
               amd64        Python interface to the wxWidgets
Cross-platform C++ GUI toolkit

Kind regards,
Ondřej Grover
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Sun Jun 11 01:02:37 2023; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.