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,



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]
Exec=wine /home/$USER/.wine/c_drive/Program\ Files/Sumatra/sumatrapdf.exe %F
Categories=Viewer StartupNotify=false

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

| improve this answer | |
  • 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 4 '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 4 '14 at 18:47
  • Foxit exists for Linux: foxitsoftware.com/downloads/… – Naveen Jun 5 '14 at 2:17
  • Adobe Reader Exists for Linux: apps.ubuntu.com/cat/applications/precise/acroread – Naveen Jun 5 '14 at 2:17
  • And there are plenty of other open source PDF readers for Linux: alternativeto.net/software/adobe-reader/… – Naveen Jun 5 '14 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.