browse by category or date

I like Foxit Reader very much. It’s fast, small and give you pretty much everything you need for a PDF Reader. Although they have the Linux version, I don’t really like it because I don’t seem to be able to automatically open a PDF file with a single click from Nautilus (although I already set ReaderLinux as the default Application).

Before we proceed, I am assuming you already have Wine up & running, and have installed the Windows version of Foxit Reader. What we need to do next is to associate the PDF file to Foxit Reader through Wine in Nautilus (or other File Manager that you have). If you have not install Wine, you could read the tutorial HERE.

After you have Wine up and running, download the Windows version of Foxit Reader HERE. Install it using the default settings.

First save the following script as foxit.sh in your home directory

#!/bin/bash
# Purpose: To convert Linux-style filename to Windows-style to pass as an argument
# to wine when starting Foxit Reader
Filename="z:"${1//\//\\}
#assuming you use the default installation folder for Foxit in Wine
App='eval wine "C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" "'$Filename'"'
$App

Use foxit.sh as the Default Application for PDF File (select any PDF file in Nautilus, Right-Click -> Properties -> Open With -> Click [+ Add] Button -> Browse for foxit.sh located in your home folder.

Voila! Foxit Reader is now the default application for your PDF documents.

(Disclaimer: This post was based on 64-bit Ubuntu Gutsy Gibbon and Foxit Reader 2.1 Build 2023)

Download foxit.sh

GD Star Rating
loading...
Foxit Reader on Ubuntu Linux (through Wine), 4.3 out of 5 based on 3 ratings

About Hardono

Hi, I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 9 years.

1 Trackback

 

50 comments so far

Add Your Comment
  1. Hi,

    Thank you for your excellent guide!

    I’ve my Win32 Firefox 1.5 running on wine 0.9.51 in order to access our company’s Oracle Form Server via JRE1.5.0.11 (via wine also) , but the only problem was that I can’t find any working Win32 PDF viewer to use under WINE’s fake Windows, until I read your blog today.

    I also like Foxit Reader very much after I’ve evaluated in my wine applications, and now I also want to use it for my Linux Desktop to replace the slow acroread, crippled evince, and ugly xpdf etc….

    But I can’t get it work according to your above mentioned script.

    My foxit reader is locating under ~/.ies4linux/ie6/drive_c/Foxit/Foxit-Reader.exe

    I tried to add WINEPREFIX=/home/xxx/.ies4linux/ie6 in front of the line, but it’s not working…

    Please let me know as to how I should modify your script in order to get it work?

    Thanks!
    Bryan

  2. Hi Bryan,

    I think my source code displayed wrongly because my syntax highlighter doesn’t support BASH.

    Looking at your case, you could try to modify it as follows:

    App=’eval wine “C:FoxitFoxit-Reader.exe” “‘$Filename\'”‘

    UPDATE: the javascript hides few of my back-slashes ()

  3. Hi,

    Thanks for your reply.

    I’ve re-modified it again accordingly, but I got the following error:

    foxit.sh: 4: Syntax error: Bad substitution

    Any ideas?

    Can you please put your script file somewhere for download?

    Thanks!
    Bryan

  4. Hi Bryan,

    just use the ‘View Plain’, copy the whole string, then save it as foxit.sh

  5. There is alrady a native Linux version of Foxit Reader. Check out the official site..

  6. > coldpi : There is alrady a native Linux version of Foxit Reader. Check out the official site..

    it doesn’t work moron

  7. Hi, I’m trying out Ubuntu 8.04 and running Wine 1.0 (yes I’m a linux noob)
    I got Foxit 2.3 to install and if I double click on the icon on my Desktop it opens, so far so good.
    I tried copying your script but when I try to Add Application I get the following:
    Could not find application
    Could not find ‘/home/xxx/foxit.sh’

    Well, that’s where I saved the script, so am now stuck.
    Any help much appreciated.
    Thanks,
    Jon.

  8. OK, hope this helps
    Tried running foxit.sh in the terminal,
    Foxit opens but with an error message:
    Z:homexxx
    Couldnot open file.
    File not found.

    any idea as to what file its looking for and where it should be? Clicking on the OK in the error message promptly shuts Foxit back down again.
    so close!

  9. OK don’t worry about it, its all working now
    Thanks for the script, Jon.

  10. Cheers to you, John.

  11. I’ve noticed that this script has difficulty opening filenames with several spaces. I suggest modifying line four as follows:

    Filename=\'”z:”${1////}’
    #Added graves before and after the filename

    This should be a bit more “robust” with filenames. Hope this helps. ^,^

  12. I am having the same problem as Jon. Any thoughts on how to fix it.

    Hey Jon, how to you overcome the problem?

  13. Fixed the problem by making the script executable.

    But now when I open a pdf it only opens foxit, and does not open the pdf in foxit. Any suggestions would be greatly appreciated.

  14. Hi Isomer,

    I’ll update this post. I think I’ll attach the bash script file. WordPress messes up the characters.

  15. Thanks very much. It is working wonderfully now.

  16. Ok.. finally I uploaded the script.

    Just a caution though, the script will fail to open file with double quote(“). This is the difference between Windows and Linux/Unix. Windows filename doesn’t allow double quote.

  17. Hi,

    I have the problem that Jon seemed to have but that he apparently solved… any help would be very useful

    i created the SH script but whenever I do ‘Open with’ and go find the script where I put it, whenever I try to hit OK I get an error message saying “could not find application”…

    what should I do?

    thanks

    JB

  18. I tried your scripts but it did not work for me. The following way works for me.

    App=’eval wine “/media/OS/Program Files/Foxit Software/Foxit Reader/Foxit

    See here http://ubuntuforums.org/archive/index.php/t-343515.html , the last

  19. I meant

    App=’eval wine “/media/OS/Program Files/Foxit Software/Foxit Reader/Foxit Reader.exe” “‘$Filename\'”‘