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 759529 - evince tries to launch a program in its current directory instead of in the PATH
evince tries to launch a program in its current directory instead of in the PATH
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: PDF
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-16 08:55 UTC by Denis Bitouzé
Modified: 2018-05-22 16:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Here is the PDF file, `test.pdf`, to which the `test.tex` file is attached. (13.66 KB, text/pdf)
2015-12-16 08:55 UTC, Denis Bitouzé
Details

Description Denis Bitouzé 2015-12-16 08:55:10 UTC
Created attachment 317480 [details]
Here is the PDF file, `test.pdf`, to which the `test.tex` file is attached.

The joined PDF file results from the `pdflatex` compilation of the
following `test.tex` file located in my `/home/bitouze/latex/divers/`
directory:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{hyperref}
\pdfcompresslevel=0
\begin{document}
\href{run:firefox https://wiki.gnome.org/Apps/Evince}{Open evince page.}
\end{document}
--8<---------------cut here---------------end--------------->8---

If this PDF file is open with `xpdf`, a click on the link launches a pop
up window which says:

  ┌────
  │ About to execute the command: https://wiki.gnome.org/Apps/Evince &
  └────

and asks me if I really want to do this. If I click "OK" then I get what
I expect.

By contrast, if this PDF file is open with `evince`, a click on the link
fails with the error:

  ┌────
  │ Unable to launch external application.
  │ Error when getting information for file
  │ '/home/bitouze/latex/divers/firefox https://wiki.gnome.org/Apps/Evince':
  │ No such file or directory
  └────

So `evince` tries to launch a program in its current directory called
'firefox https://wiki.gnome.org/Apps/Evince'.

Looking at the PDF's content, one can see the line:

  ┌────
  │ /Subtype/Link/A<</F(firefox\040https://wiki.gnome.org/Apps/Evince)/S/Launch>>
  └────

so probably `evince` behavior for 'Launch' PDF action should be improved.
Comment 1 Felipe Borges 2016-09-30 14:27:42 UTC
The PDF specs doesn't seem to define a standard for launching actions for Unix platforms[0], in doing so, I would assume that it is up to the application (viewer) to define it.

In the application side there are two basic approaches for dealing with the launch actions: handle the string as a explicit command or breaking it up with some heuristics.

What we do is to take the whole string as a path and pass it to the system's "open" command (respecting the user's choice of web browser, for instance).
* we could discuss changing this behavior here *

To work this around, I suggest:
  1) to write your tex command as "\href{run:https://wiki.gnome.org/Apps/Evince}{Open evince page.}" to rely on the viewer; or

  2) in a more hackish way, to write "\href{run:launch_evince.sh}{Open evince page.}" whereas "launch_evince.sh" would be a shell script which would launch firefox. Something as simple as:

#!/bin/bash
firefox https://wiki.gnome.org/Apps/Evince

[0] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
Comment 2 GNOME Infrastructure Team 2018-05-22 16:26:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/640.