2013-04-27

Slitaz -- ed2k/magnet


firefox add ed2k and magnet links support

1.
tux@slitaz:~$ sudo tazpkg -gi amule
tux@slitaz:~$ sudo tazpkg -gi ctorrent-dnh

2. edit mimeTypes.rdf
tux@slitaz:~$ leafpad ~/.mozilla/firefox/ytsl1hel.default/mimeTypes.rdf
before the last line (</RDF:RDF>) insert

<!-- magnet -->
<RDF:Description RDF:about="urn:scheme:magnet"
NC:value="magnet">
<NC:handlerProp RDF:resource="urn:scheme:handler:magnet"/>
<RDF:Description RDF:about="urn:scheme:externalApplication:magnet"
NC:prettyName="ctorrent"
NC:path="/usr/bin/ctorrent" />
<RDF:Description RDF:about="urn:mimetypes">
<NC:MIME-types RDF:resource="urn:mimetypes:root"/>
<RDF:Description RDF:about="urn:schemes">
<NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
<RDF:Description RDF:about="urn:root"
NC:zh-TW_defaultHandlersVersion="3" />
<RDF:Description RDF:about="urn:scheme:handler:magnet"
NC:alwaysAsk="false">
<NC:externalApplication RDF:resource="urn:scheme:externalApplication:magnet"/>
<NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/ctorrent"/>
<RDF:Description RDF:about="urn:handler:local:/usr/bin/ctorrent"
NC:prettyName="ctorrent"
NC:path="/usr/bin/ctorrent" />
</RDF:Description>
<!-- ed2k -->
<RDF:Description RDF:about="urn:scheme:ed2k"
NC:value="ed2k">
<NC:handlerProp RDF:resource="urn:scheme:handler:ed2k"/>
<RDF:Description RDF:about="urn:scheme:externalApplication:ed2k"
NC:prettyName="amule"
NC:path="/usr/bin/amule" />
<RDF:Description RDF:about="urn:mimetypes">
<NC:MIME-types RDF:resource="urn:mimetypes:root"/>
<RDF:Description RDF:about="urn:schemes">
<NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
<RDF:Description RDF:about="urn:root"
NC:zh-TW_defaultHandlersVersion="3" />
<RDF:Description RDF:about="urn:scheme:handler:ed2k"
NC:alwaysAsk="false">
<NC:externalApplication RDF:resource="urn:scheme:externalApplication:ed2k"/>
<NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/amule"/>
<RDF:Description RDF:about="urn:handler:local:/usr/bin/amule"
NC:prettyName="amule"
NC:path="/usr/bin/amule" />
</RDF:Description>
<RDF:Seq RDF:about="urn:schemes:root">
<RDF:li RDF:resource="urn:scheme:ed2k"/>
<RDF:li RDF:resource="urn:scheme:magnet"/>
</RDF:Seq>

3.
restart firefox

4.
tux@slitaz:~$ pgrep -fl ed2k
2623 /usr/bin/amule ed2k://|file|wheezy_qt5_20130310.tar|1637990400|3E8E082EC8B0B8DB4ACC62CB1943975A|/
tux@slitaz:~$