Writing this down because it took me way too long to realise what I was missing.
If you’re getting the error “Operation Not Supported” when calling gtk_show_uri() or g_app_info_launch_default_for_uri(), then you’re most likely missing gvfs, which contains the extension points for all non-file:// URI schemas.
Now here’s the bit I forgot… gvfs has to be installed in the same prefix as glib. So if it works for your system GLib, but not for the one you built in some prefix, you probably forgot to build and install gvfs in that prefix.
Awesome! I just had a similar problem: GIO modules (glib-networking) need to be installed in the same prefix as glib. Thanks.
A similar thing happened to me a couple of days ago when my manually installed glib didn’t have the dconf gio extension since the system installed dconf had put it in the system’s gio extensions path which my source-built glib wouldn’t read.
I needed the latest glib for my work so I had to install dconf in the same prefix as that of the built glib.
* dconf was required for saving Empathy settings.