Some progress here:
- Creating the .desktop file allow to , but it requires additionnal
actions. On a system-wide side:
* copy the desktop file to /usr/share/applications
* edit the additionnal mimetypes of the .desktop file, because a
dispvm can potentially open any mimetype (I only put html currently).
* run update-desktop-database /usr/share/applications as root (it
will regenerate /usr/share/applications/mimeinfo.cache)
* eventually edit defaults.list if you want to change mime associations
Now you can right click on a .html file, and the file manager will add
"open in dispvm" in the "open with" menu.
- Using thunderbird is different because thunderbird use its own mime
handler:
* If no mime handler is configured, thunderbird use the default
mime handler found in the defaults.list file (probably using gnome-open
or gvfs-open)
* Thunderbird creates new handlers only when opening an attachment,
and it doesn't give the choice to use system defined handlers (in
mimeinfo.cache)
* As a consequence, it is not possible to easily create new
handlers for html links, except by loading the file mimeTypes.rdf into
your thunderbird profile. It attached this file in its simplest form
that could be used for selecting either firefox or open in dispvm:
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="
http://home.netscape.com/NC-rdf#"
xmlns:RDF="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="urn:root"
NC:en-US_defaultHandlersVersion="-1" />
<RDF:Description RDF:about="urn:scheme:handler:http"
NC:alwaysAsk="true">
<NC:possibleApplication
RDF:resource="urn:handler:local:/usr/bin/qvm-open-in-dvm"/>
<NC:possibleApplication
RDF:resource="urn:handler:local:/usr/bin/firefox"/>
<NC:externalApplication
RDF:resource="urn:scheme:externalApplication:http"/>
</RDF:Description>
<RDF:Seq RDF:about="urn:mimetypes:root">
</RDF:Seq>
<RDF:Description RDF:about="urn:handler:local:/usr/bin/firefox"
NC:prettyName="Firefox"
NC:path="/usr/bin/firefox" />
<RDF:Description RDF:about="urn:handler:local:/usr/bin/qvm-open-in-dvm"
NC:prettyName="Open in DispVM"
NC:path="/usr/bin/qvm-open-in-dvm" />
<RDF:Description RDF:about="urn:scheme:https"
NC:value="https">
<NC:handlerProp RDF:resource="urn:scheme:handler:https"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:handler:https"
NC:alwaysAsk="true">
<NC:possibleApplication
RDF:resource="urn:handler:local:/usr/bin/firefox"/>
<NC:possibleApplication
RDF:resource="urn:handler:local:/usr/bin/qvm-open-in-dvm"/>
<NC:externalApplication
RDF:resource="urn:scheme:externalApplication:https"/>
</RDF:Description>
<RDF:Seq RDF:about="urn:schemes:root">
<RDF:li RDF:resource="urn:scheme:http"/>
<RDF:li RDF:resource="urn:scheme:https"/>
</RDF:Seq>
<RDF:Description RDF:about="urn:schemes">
<NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:http"
NC:value="http">
<NC:handlerProp RDF:resource="urn:scheme:handler:http"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:externalApplication:https"
NC:prettyName="Firefox"
NC:path="/usr/bin/firefox" />
<RDF:Description RDF:about="urn:scheme:externalApplication:http"
NC:prettyName="Firefox"
NC:path="/usr/bin/firefox" />
<RDF:Description RDF:about="urn:mimetypes">
<NC:MIME-types RDF:resource="urn:mimetypes:root"/>
</RDF:Description>
</RDF:RDF>