| Author |
Message |
ozsouth
Joined: 01 Jan 2010 Posts: 81 Location: S.E Australia
|
Posted: Fri 11 Feb 2011, 04:25 Post subject:
Foxitreader URL launch fix Subject description: So clicking on a URL opens a browser |
|
*** Edit 17/2/11 (http fix is OK; www fix needed amending) ***
Foxitreader is a great pdf reader - can open embedded URLs. Default result in Puppy was to launch default text editor instead of browser. Other distros didn't have that trouble. Problem is in /usr/local/bin/defaulthandler.
Remove lines 6-8:
| Code: | if [ "`echo -n "$AFILE" | grep '\.'`" = "" ];then
#/usr/local/bin/defaulttexteditor "$1"
exit |
Replace with:
| Code: | if [ "`echo -n "$1" | grep 'http:'`" ];then
/usr/local/bin/defaultbrowser "$1"
exit
fi
if [ "`echo -n "$1" | grep 'www.'`" ];then
/usr/local/bin/defaultbrowser "http://""$1"
exit |
URLs now open the browser. Nothing else appears to be affected.
Last edited by ozsouth on Thu 15 Mar 2012, 17:34; edited 1 time in total
|
|
Back to top
|
|
 |
In the Doghouse
Joined: 03 Oct 2010 Posts: 6
|
Posted: Tue 01 Mar 2011, 08:27 Post subject:
Foxit URL launch fix Subject description: also fixes TrueCrypt Help menu URL's |
|
To ozsouth about the URL launch fix, THANK YOU!
I tried this, and it got FoxitReader reading embedded URLs, just as promised.
The bonus is that it also resolved my problem with TrueCrypt, which would take Help menu URLs, and launch an empty geany text editor window. (only remaining TrueCrypt Help menu problem is that the TrueCrypt User's Guide.pdf tries to be imported from postscript (?) into GIMP, instead of just going into Foxit. Had to replace gimp-2.6 executable with a script of the same name, that looks for the TrueCrypt launch of GIMP, and replaces it by calling Foxit:
| Code: | #!/bin/sh
if [ "`echo -n "$1" | grep 'TrueCrypt'`" ]; then
/usr/local/bin/FoxitReader "$1"
exit
fi
exec gimp-2.6ORIG |
[Syntax borrowed from ozsouth's URL fix script]
This works, but would love to know why Puppy calls GIMP for a PDF launch)
|
|
Back to top
|
|
 |
Michalis
Joined: 08 Jan 2008 Posts: 237 Location: Greece
|
Posted: Thu 03 Mar 2011, 19:45 Post subject:
|
|
Great fix ozsouth.
Works also for transmission, probably for other programs too. I have suggested it also to Barry at his blog.
|
|
Back to top
|
|
 |
Barkin

Joined: 12 Aug 2011 Posts: 463
|
Posted: Wed 14 Mar 2012, 21:04 Post subject:
Subject description: maybe needs https fix |
|
HTTPS links in PDFs don't work for me in Foxit (with FireFox 7),
all HTTPS hyperlinks clicked on in Foxit in my Puppy 525 are redirected to www.homeimprovement.com
I've attached a test PDF (in zip file) with HTTP and HTTPS links, (made in Open Office).
[Both the HTTP and HTTPS links in the attached PDF work OK in Adobe reader in Windows Vista].
| Description |
PDF in ZIP file
|

Download |
| Filename |
PDF with HTTPS hyperlink, a test for Foxit in Puppy.zip |
| Filesize |
30.56 KB |
| Downloaded |
89 Time(s) |
|
|
Back to top
|
|
 |
ozsouth
Joined: 01 Jan 2010 Posts: 81 Location: S.E Australia
|
Posted: Thu 15 Mar 2012, 04:27 Post subject:
Foxitreader Quick Fix |
|
Referring to initial post, removing the colon after the first http (in /usr/local/bin/defaulthandler) is the quick fix. I now use Racy 522 & its Epdfview opens weblinks, but the same version doesn't in Puppy 525/528/529.
|
|
Back to top
|
|
 |
|