This was something I thought we wanted for wine for a long time, but I can't find any literature suggesting that's the case. So I'll just explain it here.
As it is right now, we have a filetype/association system in Wine's registry, and we have a completely separate one in most Linux desktops. They do not talk to each other. Wine's system relies primarily on extensions because that's what Windows does, but the Linux system works based on MIME Types.
I would like to see this gap bridged in one direction by exporting the information in Wine's registry in a simplified format and converting it to something useful for Linux desktops. From what I've seen so far, this looks surprisingly simple.
On the Linux end, MIME Types can be registered as described at http://www.freedesktop.org/wiki/Specifications/AddingMIMETutor (only using ~/.local/share instead of /usr/local/share). fd.org doesn't seem to have a standard for registering actions so that would need to be desktop-specific, but I don't expect any major problems from that.
The Windows registry does appear to contain some MIME Types, but they're spotty and unreliable. I'm told, though, that most desktops can cope with things like application/x-extension-html even when text/html exists. Generating types like that is probably the way to go. From there, it's a simple matter to get a list of verbs that apply to files with each extension.
To register those verbs for Linux desktops, some sort of command-line wrapper around ShellExecute would be needed. I think this is a good idea anyway. Does Windows have anything like that? Is it worth it for me to try writing something like that based on winelib?
Also, what's the best way to design this if I want to see it added to Wine? I know how I'd do it as a set of external programs, but I'd rather avoid that.
Attached is a simple python script I wrote that prints all of the information I think is necessary to be exported from Wine's registry. I know python is the worst thing I could use if I want something in Wine, but it should be good enough that I can try to import the information on the Linux end before spending too much time on something that may or may not ultimately be useful.
On 8/8/07, Vincent Povirk madewokherd+d41d@gmail.com wrote:
As it is right now, we have a filetype/association system in Wine's registry, and we have a completely separate one in most Linux desktops. They do not talk to each other. Wine's system relies primarily on extensions because that's what Windows does, but the Linux system works based on MIME Types.
I would like to see this gap bridged in one direction by exporting the information in Wine's registry in a simplified format and converting it to something useful for Linux desktops. From what I've seen so far, this looks surprisingly simple.
It sounds to me something like winemenubuilder should be extended to register the mimetype when a new extension is registered in Wine. I mean I think it would be safe to assume if a user installs application foo under Wine then they would want application foo to be able to be used from the Linux Desktop via the menutype. Maybe another tab should be added to winecfg to manage mimetypes that are handled by wine.