GNOME Bugzilla – Bug 790198
Non-Flatpak, single-instance GApplications fail to run
Last modified: 2017-11-11 20:29:09 UTC
In the Flatpak Nightly channel of Builder, running a GApplication which is not using Flatpak (using the host operating system in the build preferences) and is set to use a single instance (the app checks if there is an instance running already) will fail. Steps to reproduce: 1. Create a new project using the C Gnome Application template. 2. Delete the Flatpak manifest (rm org.gnome.tcase.json). 3. Try to run the application. Results: No window is shown and the application closes immediately. The output is: `Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown` Expected: The window shows and the application works normally. Additional information: This does not occur in Builder outside of Flatpak, nor if the application is using Flatpak itself (instead of the host system). In the Gnome App C template, changing src/main.c to have `app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE);` or `app = gtk_application_new ("org.gnome.tcase", G_APPLICATION_NON_UNIQUE);` on line 63 both allow for the application to run normally, as these avoid the single-instance application negotiation.
Note that between steps 2 and 3 of reproducing the bug, one must reload the project in Builder, to ensure that it is using the correct build settings.
Created attachment 363407 [details] [review] runtime: ensure host runner runs on the host system When running with the "host" runtime from a flatpak release of Builder, we were running the application inside the flatpak runtime. This does the same thing we do for the launcher, and ensures that the program is instead launched on the host.
Thanks for reporting, should be fixed in our next Nightly build. I'll merge to 3.26 branch for stable updates. Attachment 363407 [details] pushed as 24793a9 - runtime: ensure host runner runs on the host system