GNOME Bugzilla – Bug 774784
Failed to get desktop session proxy is not an error!
Last modified: 2017-07-13 00:37:06 UTC
Created attachment 340418 [details] Wall of pointless Warnings. Trying to connect to the dbus session proxy gtk checks for an error in https://github.com/GNOME/gtk/blob/master/gtk/gtkapplication-dbus.c#L195 But the only implemented DEs are Xfce and Gnome. For other DEs a failing connection is not an error. This results in unsuitable warnings distracting the user of pretty much every gtk+ application resulting in numerous misleading bug reports in the applications' bug trackers. Gtk-WARNING **: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned Gtk-WARNING **: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned The same may suit for https://github.com/GNOME/gtk/blob/master/gtk/gtkapplication-dbus.c#L332 resulting in Gtk-WARNING **: Failed to get an inhibit portal proxy: The name org.freedesktop.portal.Desktop is not owned
This also causes gtester test cases to fail when GtkApplication is used inside them, if they are run under a fake session bus as they often are. (Warnings are fatal inside gtester.) I propose downgrading those messages to g_message() or g_debug() level, I can attach a patch if it's likely to be committed.
g_debug() is probably the better option.
Sounds very reasonable. I agree.
sure, I will say one thing though: If you are using a fake session bus for your tests, are you really testing the same thing that your users experiencing ?
Created attachment 342045 [details] [review] GtkApplication: Lack of optional components shouldn't warn The GNOME session manager, the Xfce session manager, and the Inhibit portal are all not needed for normal operation of GTK, and it's expected that they're not present on some systems. So we should not log warnings if they are not found.
(In reply to Matthias Clasen from comment #4) > sure, I will say one thing though: If you are using a fake session bus for > your tests, are you really testing the same thing that your users > experiencing ? Well, no :-) I would say if these were installed-tests then it would indeed be wrong, but on a headless autobuilder with uninstalled tests you pretty much need the fake bus.
Review of attachment 342045 [details] [review]: I'd probably make it more explicit in the commit message that the actual issue is that we cannot run GTK apps under a fake session for testing.
OK to commit to master and gtk-3-22 with an updated commit message, then?
Please do, thanks
Attachment 342045 [details] pushed as 76e5fd4 - GtkApplication: Lack of optional components shouldn't warn