After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651997 - Dummy backend for gapplication
Dummy backend for gapplication
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-06-06 15:34 UTC by Marc-Andre Lureau
Modified: 2011-11-22 23:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
unfinished example of dummy gapplication by Hans Breuer (5.81 KB, text/plain)
2011-06-06 15:34 UTC, Marc-Andre Lureau
  Details
GApplication: don't fail if can't get session bus (3.42 KB, patch)
2011-11-22 22:36 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Marc-Andre Lureau 2011-06-06 15:34:08 UTC
Created attachment 189331 [details]
unfinished example of dummy gapplication by Hans Breuer

On Windows and Mac, gapplication based apps fail to start.

While waiting for native/better backend on the different OS, we could use a simple dummy backend as proposed by Hans Breuer.

http://mail.gnome.org/archives/gtk-devel-list/2011-April/msg00046.html

(attached his experimental patch)
Comment 1 Allison Karlitskaya (desrt) 2011-11-22 22:20:25 UTC
A better suggestion may be to simply attempt to connect to the bus and, if that fails, proceed anyway -- as a non-unique application that makes no attempt to synchronise with other instances.
Comment 2 Allison Karlitskaya (desrt) 2011-11-22 22:36:31 UTC
Created attachment 201956 [details] [review]
GApplication: don't fail if can't get session bus

If we can't get on the session bus, just behave like a normal non-unique
application.

This turns out to be remarkably easy to implement and lets us avoid
adding a 'dummy' backend.

Add a test for this case as well.

Idea from Zachary Dovel.
Comment 3 Allison Karlitskaya (desrt) 2011-11-22 22:36:44 UTC
Attachment 201956 [details] pushed as 345688c - GApplication: don't fail if can't get session bus
Comment 4 Marc-Andre Lureau 2011-11-22 23:02:14 UTC
thanks!