Obsolete commands in xpdfrc

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Obsolete commands in xpdfrc

Jonathan Drews
OpenBSD 6.1 amd64

Clicking on a URL in xpdf does not open the URL in firefox (firefox-esr)

To Fix:
copy the xpdfrc to your home directory:
$cp /usr/local/share/examples/xpdf/xpdfrc ~/.xpdfrc

Uncomment the line:
#urlCommand     "firefox -newtab -url 'openURL(%s)'"
and change it to:
urlCommand      "firefox-esr -new-window  %s"

The problem I have is that both man (5) xpdfrc and the xpdfrc have the
deprecated commands. That is the xpdfrc uses -newtab when it should be

I posted at Xpdf forums and one of the developers wrote back. His reply is

My question, would you want me to update this xpdfrc or is Xpdf-3.04 going
to be replaced by the Qt based Xpdf-4?

Reply to my query on Xpdf Forums:

Xpdf 4 no longer uses the "urlCommand" setting in xpdfrc. Instead it uses
Qt's builtin URL handling, i.e., it calls QDesktopServices::openUrl().

On my Linux box, I set the BROWSER environment variable to control that
behavior. But if you're using a desktop environment, there's probably some
other way to do it.

It looks like I forgot to remove urlCommand from the sample xpdfrc file
distributed with xpdf, and from the "EXAMPLES" section in the xpdfrc(5) man
page. I'll fix that.

The list of settings in the xpdfrc(5) man page is correct and up to date.
The error was in the EXAMPLES section at the end (which still included the
urlCommand setting).

The package that I distribute doesn't reference "firefox" or "firerfox-esr"
at all. (The xpdfrc EXAMPLES section had "netscape -remote ...", which
tells you how long it's been since that was updated.) I suspect those were
changes made by whoever created the OpenBSD package, so you'll need to talk
to them about the "new-tab" issue. Actually, they should just remove
urlCommand entirely.