I regularly annotate pdf files and unfortunately there is no good linux pdf reader that supports decent annotations. Evince has a very rudimentary and buggy annotation feature. So I'm stuck using a Windows viewer through wine.
This works pretty well but, when I simply right-click a file (in this case a pdf), properties, open with and selected Foxit Reader, the Unity Launcher icon remained the wine icon instead of the application icon.
Has anyone set a wine program as the default program for any file?
Any ideas?
I solved the problem myself. Here's how:
Step 1: Create script
I followed the procedure in the https://help.ubuntu.com/community/Wine page:
gedit ~/.wine/Foxit5
Now paste the following script in it, save and close gedit. If you changed the installation path, modify the 2nd line accordingly.
Make sure the file is executable with this command.
Step 2: Create .desktop file
Info from this site: http://ubuntuforums.org/showthread.php?t=1863021
Don't forget the %f, this shows that the application can be passed a file name, it has to be there to show up in the list.
sudo cp sol.desktop foxit.destop
gksudo gedit foxit.desktop
foxit.desktop Code: (I created an icon and saved it in the .icons folder)
Step 3: Set as default
Open file manager and find any pdf file. Click properties. Open with. Show all. Choose Foxit Reader
That's it! Well sort of… This method works only if Foxit reader 4 is not running. If it is a "file not found" error pops up.
EDIT: This methods works fully with Foxit Reader 5 but you would need to install wine 1.5 for this version to work. Visit http://www.winehq.org/download/ubuntu to do so.
I would do what zetah says:
go to:
In the drop down select:
In the pop-up dialog box select package type:
Then you can install the .deb file
Being honest though I have found the built-in PDF reader to meet all my expectations and have not needed Foxit on the Ubuntu side of things. I do use Foxit on my Windows VM though.
If you need advanced features like Annotations and Hilighting you can use:
[Okular][3] or even Inkscape
I'd suggest you to take a look in 2 related answers on how setting default applications: this one and this another one.
Note that it should not be necessary to run Foxit Reader via Wine, as there is a Ubuntu package for it already.
There's a Foxit Reader version for Linux: https://www.foxitsoftware.com/pdf-reader/
It's a .tar.gz file and they give instructions for installation.