It's not a segfault, it's a g_error() and thus a SIGABRT. This happens
in gdk_display_manager_open_display(): It iterates over all available
backends, and as there is no $DISPLAY the X.org backend fails. Then it
tries the wayland backend but there is no $XDG_RUNTIME_DIR either so it
fails as well.

The obvious workaround here is to either run the thing under Xvfb to
provide a $DISPLAY, or set $XDG_RUNTIME_DIR to some $(CURDIR)/debian/tmp
during package build. But of course in the latter case Gdk won't
actually do anything. So if you import Gdk to use it, I'd rather
recommend xvfb.

So for GDK this is pretty much a wontfix. If we keep this open, then
against pygobject, as its Gdk overrides trigger the initialization of
GTK/GDK on import. This is mostly due to being backwards compatible with
PyGTK, and all Python code out there which uses Gtk/Gdk expects this,
and doesn't call Gdk.init()/Gtk.init() explicitly. So the wishlist bug
would be to not try and initialize Gdk if there's no DISPLAY or runtime
dir, but that's really not something which we want to carry downstream.

** Summary changed:

- In Utopic importing Gdk requires $XDG_RUNTIME_DIR
+ In Utopic importing Gdk requires $XDG_RUNTIME_DIR or $DISPLAY

** Package changed: gtk+3.0 (Ubuntu) => ubuntu

** Package changed: ubuntu => pygobject (Ubuntu)

** Changed in: pygobject (Ubuntu)
       Status: New => Triaged

** Changed in: pygobject (Ubuntu)
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gtk+3.0 in Ubuntu.
https://bugs.launchpad.net/bugs/1339506

Title:
  In Utopic importing Gdk requires $XDG_RUNTIME_DIR or $DISPLAY

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/1339506/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to