網路上大都說從about:config改相關的設定值,可是,我試了好幾個小時,在新版的Firefox(目前用nightly)都是無效的。
最後找到修改mimeTypes.rdf的方法終於有用了,現在分享給大家修改的方法。
首先找到Firefox設定檔的存放位置,Linux都是在家目錄底下,請先把要修改的檔案備份,在編輯mimeTypes.rdf
cd ~/.mozilla/firefox/(You Profile Name)
cp mimeTypes.rdf mimeTypes.rdf.bak
gedit mimeTypes.rdf
在最後一行</RDF:RDF>前插入↓
<!-- 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="qbittorrent"
NC:path="/usr/bin/qbittorrent" />
<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/qbittorrent"/>
<RDF:Description RDF:about="urn:handler:local:/usr/bin/qbittorrent"
NC:prettyName="qbittorrent"
NC:path="/usr/bin/qbittorrent" />
</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>
存檔後重新啟動瀏覽器,去開開看ed2k、magnet連結,是不是能正常開啟。想要修改關連程式也可以在應用程式中修改。