10

I want to open images using Fast Stone Image viewer in Ubuntu. I have installed the application in wine. How to associate jpg file to always open in Faststone that installed in wine.

Marco Ceppi
  • 48,101

3 Answers3

8

All you need to associate file of some type to be handled by some app, also by wine app, you can find in folder

~/.local/share/applications  

you will need to open

~/.local/share/applications/mimeapps.list

and find needed type, like this:

image/jpeg=eog.desktop;wine-extension-jpeg.desktop;

as you see there are two files which are relative to this type, if the file stand first it will be the default handler for this type, the other will be shown in "Open with" menu

this is example of .desktop file

[Desktop Entry]
Name=PHP Expert Editor
Exec=wine start C:\\\\Program\\ Files\\\\PHP\\ Expert\\ Editor\\ 4.3\\\\phpxedit.exe z:%f
MimeType=image/jpeg
Type=Application
StartupNotify=true
Path=/home/m/.wine/dosdevices/c:/Program Files/PHP Expert Editor 4.3
Icon=/home/m/.local/share/icons/10de_phpxedit.0.png

the whole point in the "Exec=" line at the and "z:%f"

Exec=wine start C:\\\\Program\\ Files\\\\PHP\\ Expert\\ Editor\\ 4.3\\\\phpxedit.exe z:%f

if you don't have this line you should have an error

Can not open file "/home/...."

while trying to open some file with your app, because of wine paths are like windows disks and to open your file, for example "/home/picture.jpg" in wine you should use path "z:/home/picture.jpg"

Mikl
  • 461
  • 4
    There is no need for so much backslash escapes - just wrap the path in double quotes without any escaping – zetah Oct 23 '14 at 11:38
5

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.

Marco Ceppi
  • 48,101
danne
  • 512
1

Right-Click on a jpg file and choose Properties. Then check if your program name is available on the 4th tab, and if it is, select it.

Praweł
  • 6,490