Description of problem:
The function "g_app_info_launch_default_for_uri" should launch the default application registered to handle the specified uri. This works under regular user shell, but does not work under SCL enabled shells, for example one enabled via the following command:
scl enable thermostat1 bash
I tried with all the scl installed on my system:
Of those, only v8314 seems to work, the other aren't.
By looking at the enable script, it seems that v8314 does export few critical paths, like LD_LIBRARY_PATH and LIBRARY_PATH, however I'm not sure if this is indeed the problem itself.
Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Workstation release 7.1 (Maipo)
The SCL scripts are from those packages:
Always reproducible, just run the attached C example
Steps to Reproduce:
1. Install a package that provide SCL from the list above, ex. rh-mongodb26
2. Enable an SCL shell, ex. "scl enable rh-mongodb26 bash"
3. Compile and Run the attached C program inside this shell
"success? 0" is printed, no URL is shown.
"success? 1" should be printed instead, and a browser should fire up pointing to this bug report page.
We experienced this problem first by using Thermostat to redirect users to the online user guide, but the problem is specific to gio-2.0 (which is used by the native code in the Desktop API) as the attached C reproducer shows.
Running strace shows an hint that this may be related to a dbus failure, although I don't have knowledge of what g_app_info_launch_default_for_uri does under the hood, so this may be misleading and should be taken with a grain of salt.
However, running the same program but using the old gnome 2.0 gnome_url_show_with_env (which provided the same functionality and is commented code in the test case) does indeed open the url, so the problem may likely be related to a misconfiguration of the various paths.
Created attachment 1061909 [details]
The problem is in enable scriptlets of these collection in the way how the variable XDG_DATA_DIRS is set. Only thermostat1 uses right way how to set XDG_DATA_DIRS and v8314 doesn't set XDG_DATA_DIRS at all. But thermostat1 depends on rh-mongodb26 rh-java-common and that's why it doesn't work either.
So I am moving and cloning this bug for these collections.
This bug was resolved in rh-maven33 and it is currently not planned to be fixed in maven30.