how do i associate mime types with wine types in linux?
how do i associate mime types with wine types in linux?
i am wondering,
how do i set Debian Linux (w/ XFCE) so that when I click on a PNG file, it always opens up PhotoFiltre7?
( assume that I have PhotoFiltre in c:\Program Files\PhotoFiltre7\photofiltre.exe )
please show me the complete syntax, thanks.
how do i set Debian Linux (w/ XFCE) so that when I click on a PNG file, it always opens up PhotoFiltre7?
( assume that I have PhotoFiltre in c:\Program Files\PhotoFiltre7\photofiltre.exe )
please show me the complete syntax, thanks.
Re: how do i associate mime types with wine types in linux?
you have to create a desktop file in /home/'user'/.local/applications looking like this:
I have not the exact mime syntax for this, so the Exec line is not probably accurate. I bet PhotoFilltre7 has a proper mime association tool in its config, If you look into it, it will associate the file you want and Wine will create associated desktop files, then you could open image files with 'open with' in file context menu.
Code: Select all
[Desktop Entry]
Type=Application
Name=Wine PhotFiltre7
MimeType=image/jpeg;
Exec=env WINEPREFIX="/home/'user/'your_wine-prefix" wine start /ProgIDOpen jpegfile %f
NoDisplay=true
StartupNotify=true
Icon='PhotoFiltre_icon'
Re: how do i associate mime types with wine types in linux?
Wine should actually create native Linux mime-type files by default...protozone wrote:i am wondering,
how do i set Debian Linux (w/ XFCE) so that when I click on a PNG file, it always opens up PhotoFiltre7?
( assume that I have PhotoFiltre in c:\Program Files\PhotoFiltre7\photofiltre.exe )
please show me the complete syntax, thanks.
Take a look at the output from:
Code: Select all
find "${HOME}/.local/share/applications/" -type f -name "wine-extension-*.desktop"
To enable these to be "seen" by your native Linux Desktop Environment. You need to create the following file:
/etc/xdg/menus/applications-merged/wine.menu
Code: Select all
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>wine-wine</Name>
<Directory>wine-wine.directory</Directory>
<Include>
<Category>Wine</Category>
</Include>
<Menu>
<Name>wine-Programs</Name>
<Directory>wine-Programs.directory</Directory>
<Include>
<Category>Wine-Programs</Category>
</Include>
<Menu>
<Name>wine-Programs-Accessories</Name>
<Directory>wine-Programs-Accessories.directory</Directory>
<Include>
<Category>Wine-Programs-Accessories</Category>
</Include>
</Menu>
</Menu>
</Menu>
</Menu>
Trying to open a PNG with PhotoFiltre by default
Hey guys, thanks for the quick replies.
I will try out what you told me about... none of that is very familiar to me.
My intention is to be able to just click on a PNG file and it load PhotoFiltre7 instead of GIMP or Ristretto or whatever my Linux uses. I like most Linux programs, but for a few types of files, I only want my Wine program by default.
I tried associating manually via the "open with..." dialog box, but I couldn't get that to work for Wine programs. I know it can be done though, somehow... I just forgot the syntax.
Any other suggestions in the meantime of some alternative techniques or more details?
I will try out what you told me about... none of that is very familiar to me.
My intention is to be able to just click on a PNG file and it load PhotoFiltre7 instead of GIMP or Ristretto or whatever my Linux uses. I like most Linux programs, but for a few types of files, I only want my Wine program by default.
I tried associating manually via the "open with..." dialog box, but I couldn't get that to work for Wine programs. I know it can be done though, somehow... I just forgot the syntax.
Any other suggestions in the meantime of some alternative techniques or more details?
Re: Trying to open a PNG with PhotoFiltre by default
Ha, ha, you've opened a can of worms there!protozone wrote:
Any other suggestions in the meantime of some alternative techniques or more details?
The native Linux XDG specification is used for MIME-type handling under Wine.
See: Arch Wik: XDG MIME Applications.
The Wine builtin helper utility winemenubuilder builds the Wine menu entries and MIME associations.
See: winemenubuilder.c
Bob
How to open a windows filetype in Linux by default
Hey thanks for the help.
I think you guys got me a working solution:
1) create a launcher on the desktop (right-click)
2) set up the launcher's properties
3) select the EXE program via the window
4) put single quotes (') on each side of the EXE's full filename path (and do NOT use "%f")
5) edit the launcher in leafpad editor to clean up anything or add anything like comments
6) set the launcher to executable permission
7) move the launcher to /usr/share/applications (in root mode)
8a) now the launcher entry works like the Linux entries for the applications menu and the "Open with..." dialog!
8b) (this can work with the "default" checkbox)
Thanks! This worked for me in Wine-staging
I think you guys got me a working solution:
1) create a launcher on the desktop (right-click)
2) set up the launcher's properties
3) select the EXE program via the window
4) put single quotes (') on each side of the EXE's full filename path (and do NOT use "%f")
5) edit the launcher in leafpad editor to clean up anything or add anything like comments
6) set the launcher to executable permission
7) move the launcher to /usr/share/applications (in root mode)
8a) now the launcher entry works like the Linux entries for the applications menu and the "Open with..." dialog!
8b) (this can work with the "default" checkbox)
Thanks! This worked for me in Wine-staging
Re: How to open a windows filetype in Linux by default
Wine is already doing these steps (creating desktop launcher files) below:protozone wrote:Hey thanks for the help.
I think you guys got me a working solution:
1) create a launcher on the desktop (right-click)
2) set up the launcher's properties
3) select the EXE program via the window
4) put single quotes (') on each side of the EXE's full filename path (and do NOT use "%f")
5) edit the launcher in leafpad editor to clean up anything or add anything like comments
6) set the launcher to executable permission
7) move the launcher to /usr/share/applications (in root mode)
8a) now the launcher entry works like the Linux entries for the applications menu and the "Open with..." dialog!
8b) (this can work with the "default" checkbox)
Thanks! This worked for me in Wine-staging
Code: Select all
~/.local/share/applications/
Code: Select all
~/.local/share/icons/
So your Desktop Environment ignores the winemenubuilder generated files at present.
I've got a Github repository with all the necessary Integration files and some hi-res Wine icons (for the builtin utilities).
See: Github: bobwya / wine-desktop-common.
I often manually create .desktop files for my Wine applications.
But personally I just use vim or something to do it (they are only text files after all).
Bob
Re: How to open a windows filetype in Linux by default
protozone wrote:Hey thanks for the help.
I think you guys got me a working solution:
1) create a launcher on the desktop (right-click)
2) set up the launcher's properties
3) select the EXE program via the window
4) put single quotes (') on each side of the EXE's full filename path (and do NOT use "%f")
5) edit the launcher in leafpad editor to clean up anything or add anything like comments
6) set the launcher to executable permission
7) move the launcher to /usr/share/applications (in root mode)
8a) now the launcher entry works like the Linux entries for the applications menu and the "Open with..." dialog!
8b) (this can work with the "default" checkbox)
Thanks! This worked for me in Wine-staging
Ooops! I forgot to mention something important: At step 4, I put "wine " in front of the EXE's full filename path, so that it looks kinda like this inside of the launcher...
Code: Select all
[Desktop Entry]
Version=1.0
Type=Application
Name=PhotoFiltre
Comment=Image Editor
Exec=wine '/home/ (MYUSERNAME) /.wine/drive_c/Programs/PhotoFiltreSeven/PhotoFiltre7.exe'
Icon=applications-graphics
Path=
Terminal=false
StartupNotify=true
GenericName=PhotoFiltre 7
Categories=Graphics;