GNOME Bugzilla – Bug 755796
passing URLs as arguments opens only first one
Last modified: 2015-10-16 13:13:13 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.
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).
I have opened this bug[0] with a code snippet which illustrates it better. [0] https://bugzilla.gnome.org/show_bug.cgi?id=755948
Created attachment 312548 [details] [review] shell: support the launch of multiple URI arguments
Comment on attachment 312548 [details] [review] shell: support the launch of multiple URI arguments Thanks
https://git.gnome.org/browse/evince/commit/?id=28f8be70a6a8c941ef8326cf831238365eae4689