0

this question has been asked in a general way before, but this is my first week with Ubuntu and I can't understand all the instructions here: How to associate a file with a program installed in wine Danne's answer was: 'Right click, Open with other application. If your application is not available in the list, use custom command and put wine ~/.wine/drive_c/Program\ Files/Yourapp/Yourapp.exe in the box.' What is 'custom command'?

I also saw the instructions at https://help.ubuntu.com/community/Wine#Creating_file_associations But the other way looks easier..

In particular I want to open pdf files with Sumatra PDF. I have Ubuntu 14.04.

Thanks for your help,

Andrew

1 Answers1

0

Lets create an association file!

Open up your Terminal and execute command:

gedit ~/.local/share/applications/ViewInSumatra.desktop

You will get the text editor. There, paste something like below:

[Desktop Entry]
Name=Sumatra
Exec=wine /home/$USER/.wine/c_drive/Program\ Files/Sumatra/sumatrapdf.exe %F
Icon=evince
Type=Application
Categories=Viewer StartupNotify=false
Terminal=false
MimeType=application/pdf

NOTE: You must replace /home/$USER/.wine/c_drive/Program Files/Sumatra/sumatrapdf.exe with the real path of Sumatra PDF Reader.

Once done save the text file.

Now, right click a PDF file > choose Open With > CLick View All Applications
From the application list, choose Sumatra:

enter image description here

Now all the PDF files should be opened with Sumatra

With that said, I must say that Sumatra PDF is no match for KDE's Okular

Naveen
  • 9,365
  • 11
  • 43
  • 70
  • Thanks a lot, Naveen. Before I get started on that, does Okular work OK with the Unity Desktop? I just discovered that I can change to the KDE Desktop without a new installation. Is that the way to go? Does Okular work better with the KDE Desktop? Andrew – user5412 Jun 04 '14 at 18:21
  • I just tried Okular with Unity. It's quite a bit slower than Sumatra, which is itself a lot slower than Adobe or Foxit with Windows 7. This is my one problem now, and I use long old books a lot. I can't even scroll with Okular without waiting several seconds for each page to load. – user5412 Jun 04 '14 at 18:47
  • Foxit exists for Linux: http://www.foxitsoftware.com/downloads/thanks.php?product=Foxit-Reader&platform=Desktop-Linux – Naveen Jun 05 '14 at 02:17
  • Adobe Reader Exists for Linux: https://apps.ubuntu.com/cat/applications/precise/acroread/ – Naveen Jun 05 '14 at 02:17
  • And there are plenty of other open source PDF readers for Linux: http://alternativeto.net/software/adobe-reader/?license=free&platform=linux – Naveen Jun 05 '14 at 02:21
  • Hi Naveen, I tried those instructions. Sumatra showed up on the list of programs, but it still opens in Document Viewer. If I right click on a pdf, Sumatra shows up now in the list, but it doesn't open. – user5412 Jun 05 '14 at 08:19
  • I saw that Adobe link, but it doesn't give Ubuntu 14.04, so am not sure if it would work. I read this thread: http://ubuntuforums.org/showthread.php?t=1978238 - the only thing that seemed to work was to used Wine. Andrew – user5412 Jun 05 '14 at 08:24
  • Actually, that ViewInSumatra.desktop file stopped Sumatra opening. I had to delete it to get it working again. Andrew – user5412 Jun 05 '14 at 08:46