Bug 1252845 - GIO fails to launch applications under SCL shell
GIO fails to launch applications under SCL shell
Status: CLOSED NEXTRELEASE
Product: Red Hat Software Collections
Classification: Red Hat
Component: maven30 (Show other bugs)
maven30
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.0
Assigned To: Java maintainers
BaseOS QE - Apps
:
Depends On:
Blocks: 1256340 1256343
  Show dependency treegraph
 
Reported: 2015-08-12 07:15 EDT by Mario Torre
Modified: 2017-05-11 05:01 EDT (History)
5 users (show)

See Also:
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 05:01:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Mario Torre 2015-08-12 07:15:46 EDT
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:

maven30
rh-java-common
rh-mongodb26
thermostat1
v8314

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)
scl-utils-20130529-17.el7_1.x86_64

The SCL scripts are from those packages:

maven30-runtime-1.1-24.el7.x86_64
rh-java-common-runtime-1.1-39.el7.x86_64
rh-mongodb26-runtime-2.0-19.el7.x86_64
thermostat1-runtime-2.0-70.9.el7.x86_64
v8314-runtime-2.0-11.el7.x86_64

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 07:19:10 EDT
Created attachment 1061909 [details]
Test case
Comment 3 Ľuboš Kardoš 2015-08-24 07:48:29 EDT
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 05:01:50 EDT
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.