Bug 1252845

Summary: GIO fails to launch applications under SCL shell
Product: Red Hat Software Collections Reporter: Mario Torre <neugens>
Component: maven30Assignee: Java maintainers <java-maint>
Status: CLOSED NEXTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: maven30CC: drieden, jkejda, mizdebsk, neugens, sgehwolf
Target Milestone: ---   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1256340 1256343 1300623 (view as bug list) Environment:
Last Closed: 2017-05-11 09:01:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1256340, 1256343    
Description Flags
Test case none

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.