After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755796 - passing URLs as arguments opens only first one
passing URLs as arguments opens only first one
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-29 15:37 UTC by chrysn
Modified: 2015-10-16 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: support the launch of multiple URI arguments (839 bytes, patch)
2015-10-02 08:02 UTC, Felipe Borges
accepted-commit_now Details | Review

Description chrysn 2015-09-29 15:37:15 UTC
when starting evince with several URIs as arguments, for example

$ evince http://www.farnell.com/datasheets/1789199.pdf http://www.farnell.com/datasheets/1888820.pdf http://www.farnell.com/datasheets/664229.pdf

only the first one gets opened properly. the correct number of windows is opened, but instead of the documents, the "Recent Documents" view is shown.

i do get warnings on the console from gvfs and gtk (the usual deprecation warnings), but none that are not present when opening evince without arguments either.

opening several local files at once and opening a single url both work fine. the evince version used is 3.16.1 as shipped in debian as 3.16.1-1.
Comment 1 Felipe Borges 2015-10-01 14:13:56 UTC
I can reproduce this bug.

I have tracked it down to the call to g_app_info_launch_uris in shell/ev-application.c#n238

Apparently Evince can load the first file, but when it spawns a new Evince instance with g_app_info_launch_uris it fails because GAppInfo does not seems to be passing the right uri.

I managed to ~work this around~ by using g_app_info_launch_default_for_uri, which in this specific case, will launch Evince browser-plugin (bc it's for urls).
Comment 2 Felipe Borges 2015-10-01 15:34:03 UTC
I have opened this bug[0] with a code snippet which illustrates it better.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=755948
Comment 3 Felipe Borges 2015-10-02 08:02:19 UTC
Created attachment 312548 [details] [review]
shell: support the launch of multiple URI arguments
Comment 4 Carlos Garcia Campos 2015-10-16 11:08:09 UTC
Comment on attachment 312548 [details] [review]
shell: support the launch of multiple URI arguments

Thanks