Wine MIME handling

Roderick Colenbrander thunderbird2k at gmail.com
Tue Jun 16 13:13:36 CDT 2009


On Tue, Jun 16, 2009 at 7:23 PM, Brian Vincent<brian.vincent at gmail.com> wrote:
> On Tue, Jun 16, 2009 at 5:26 AM, Roderick Colenbrander
> <thunderbird2k at gmail.com> wrote:
>>
>> For the past few days I have been looking at MIME handling in Wine. A
>> program I'm using uses CreateProcess to launch a pdf file and I would
>> like to use the default native pdf viewer.
>
> I think it would be useful to have two different checkbox option in winecfg
> that ask:
>
> 1.  "Always open files with native application if available?"
> 2.  "Ask me whether to open with file formats with a native application or
> my Windows application?"
>
> (Optionally, saying "No" to #1 could imply #2.  However, I think it might be
> clearer to explicitly have it as an option.)
>
> For instance, in the case of PDF's, say you have a great native viewer
> available and you want to use that viewer to view all PDF's.  However, you
> also have Adobe Acrobat installed under Wine (hypothetical, I have no idea
> if that app works) and that's what you like to use for editing.  You
> probably want to use the viewer most of the time, but every once in a while
> you'd probably like to be prompted to use Acrobat so you can edit the PDF.
>
> What would also be slick is to have the Windows Explorer "Open With..."
> functionality provide a list of native apps as well.
>
> -Brian
>

The XDG spec which is what I would use defines how to find a program
which can handle the format (a default handler). The user can override
the handler but I'm not sure whether the spec also defines a way to
query which programs can handle the format. This would be needed for
the 'Open With...' stuff if it is possible then it should be done from
within shell32.

What I'm interested in at this point is a method to add native apps to
handle opening of files (using HKEY_CLASSES_ROOT like on Windows). I
propose to do this using a winemime program/script. The tool would use
'xdg-open' to get the default handler (when the user selects a
different handler from the default handler on the system, his
preference is selected). I'm not sure whether the tool needs to be a
script, program or whether it should be part of shell32. If it is a
script should xdg-open be forked or ported to C for a winelib version
of winemime?

Roderick



More information about the wine-devel mailing list