X2Go Bug report logs - #769
pyhoca-gui gtk3 support

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: Orion Poplawski <orion@cora.nwra.com>

Date: Mon, 26 Jan 2015 21:40:01 UTC

Severity: normal

Tags: pending

Found in version 0.5.0.3

Fixed in version 0.5.0.5

Done: X2Go Release Manager <git-admin@x2go.org>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#769: pyhoca-gui gtk3 support
Reply-To: Orion Poplawski <orion@cora.nwra.com>, 769@bugs.x2go.org
Resent-From: Orion Poplawski <orion@cora.nwra.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: Mon, 26 Jan 2015 21:40:01 +0000
Resent-Message-ID: <handler.769.B.142230835930341@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 769
X-X2Go-PR-Package: pyhoca-gui
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.142230835930341
          (code B); Mon, 26 Jan 2015 21:40:01 +0000
Received: (at submit) by bugs.x2go.org; 26 Jan 2015 21:39:19 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from mail.nwra.com (mail.nwra.com [192.163.220.161])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 1F9003BC69
	for <submit@bugs.x2go.org>; Mon, 26 Jan 2015 22:39:16 +0100 (CET)
Received: from [10.10.20.7] (NORTHWEST-R.edge3.Denver1.Level3.net [4.28.99.98])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.nwra.com (Postfix) with ESMTPSA id F39816021E
	for <submit@bugs.x2go.org>; Mon, 26 Jan 2015 13:39:08 -0800 (PST)
Message-ID: <54C6B3FD.9010605@cora.nwra.com>
Date: Mon, 26 Jan 2015 14:39:09 -0700
From: Orion Poplawski <orion@cora.nwra.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Package: pyhoca-gui
Version: 0.5.0.3

Fedora rawhide is in the process of moving to wxPython 3.0 with gtk3 support.
 This appears to be breaking pyhoca-gui:

/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_set_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot
register existing type 'GtkWidget'
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
(instance_type)' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot
register existing type 'GtkBuildable'
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE
(interface_type)' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_once_init_leave: assertion 'result != 0' failed
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_register_static: assertion 'parent_type > 0' failed
  from gtk import _gtk


I believe this is because we are mixing a gtk2 based notify-python module with
the gtk3 wxPython module.  This seems like further impetus to move to a modern
python libnotify interface, either notify2 or gobject introspection Notify.

Code difference for gi appears to be:

diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index bc49028..85f0d52 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -22,7 +22,7 @@ import wx
 from x2go import X2GOCLIENT_OS
 from x2go import log
 if X2GOCLIENT_OS in ('Linux', 'Mac'):
-    import pynotify
+    from gi.repository import Notify
 import exceptions
 import basepath

@@ -52,7 +52,7 @@ class libnotify_NotifierPopup(object):
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger

-        if not pynotify.init("PyHocaGUI"):
+        if not Notify.init("PyHocaGUI"):
             raise NotSupportedException

     def prepare(self, context, title=None, text=None, icon=None, timeout=None):
@@ -132,8 +132,8 @@ class libnotify_NotifierPopup(object):

         try:
             if not self._PyHocaGUI.disable_notifications and title and text:
-                n = pynotify.Notification(title, text, icon)
-                n.set_urgency(pynotify.URGENCY_NORMAL)
+                n = Notify.Notification.new(title, text, icon)
+                n.set_urgency(Notify.Urgency.NORMAL)
                 n.set_timeout(timeout)
                 n.show()
         except:


Although with that change, unless I comment out the set_urgency() call, I
don't see the message "SSH key authentication has been successful." pop-up
above the pyhoca-gui icon.  But perhaps the new behavior is proper.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                   http://www.nwra.com

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 17:02:33 2024; 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.