Bug 1252845 - GIO fails to launch applications under SCL shell
Summary: GIO fails to launch applications under SCL shell
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: maven30
Version: maven30
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.0
Assignee: Java maintainers
QA Contact: BaseOS QE - Apps
Depends On:
Blocks: 1256340 1256343
TreeView+ depends on / blocked
Reported: 2015-08-12 11:15 UTC by Mario Torre
Modified: 2019-11-14 06:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1256340 1256343 1300623 (view as bug list)
Last Closed: 2017-05-11 09:01:50 UTC
Target Upstream Version:

Attachments (Terms of Use)
Test case (614 bytes, text/x-csrc)
2015-08-12 11:19 UTC, Mario Torre
no flags Details

Description Mario Torre 2015-08-12 11:15:46 UTC
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:


How reproducible:

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

Actual results:

"success? 0" is printed, no URL is shown.

Expected results:

"success? 1" should be printed instead, and a browser should fire up pointing to this bug report page.

Additional info:

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.

Comment 2 Mario Torre 2015-08-12 11:19:10 UTC
Created attachment 1061909 [details]
Test case

Comment 3 Ľuboš Kardoš 2015-08-24 11:48:29 UTC
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.

Comment 8 Mikolaj Izdebski 2017-05-11 09:01:50 UTC
This bug was resolved in rh-maven33 and it is currently not planned to be fixed in maven30.

Note You need to log in before you can comment on or make changes to this bug.