如何让 Firefox 通过传输打开 torrent 文件?

Jon*_*han 14 firefox bittorrent

每次我下载一个 torrent 文件 ( .torrent) 时,Firefox 都认为我应该用文本编辑器打开它。我怎样才能让它用传输打开?在编辑 -> 首选项 -> 应用程序中,没有种子文件的设置,也没有明显的方法来添加新的文件类型。

pre*_*ise 27

方法(一):使用Firefox的Preferences菜单:(首选)

答:从Firefox的全局菜单,选择é编辑- > Prefere ñ CES(或按Alt+E之后N)打开Firefox的首选项

(在 Ubuntu 12.04 中拍摄的快照) 1

B. 选择应用程序菜单并搜索BitTorrent 种子文件application/x-bittorrenttorrent。通过选择使用其他...始终询问使用 gedit(默认)更改为传输-gtk,然后单击侧栏中的文件系统,然后浏览到。/usr/bin

2

C./usr/bin搜索传输-gtk,双击打开。

3

D、就是这样!现在 .torrent 文件将通过传输打开。

4


方法(2):编辑mimeTypes.rdf文件:

第1步:

使用您选择的文本编辑器打开mimeTypes.rdf文件:

gedit ~/.mozilla/firefox/ythemo16.default/mimeTypes.rdf &
Run Code Online (Sandbox Code Playgroud)

(保存此文件的备份。)搜索容器:

<RDF:Seq RDF:about="urn:mimetypes:root">
 ...
 ...

</RDF:Seq>
Run Code Online (Sandbox Code Playgroud)

并插入:

<RDF:li RDF:resource="urn:mimetype:application/x-bittorrent"/>
Run Code Online (Sandbox Code Playgroud)

所以,现在容器看起来像这样:

<RDF:Seq RDF:about="urn:mimetypes:root">
 ...
 ...

 <RDF:li RDF:resource="urn:mimetype:application/x-bittorrent"/>
</RDF:Seq>
Run Code Online (Sandbox Code Playgroud)

(步骤 1 快照) mimeType-edit-snap1

第2步:

现在,在容器内:

<RDF:RDF ... ...>
 ...
 ...
 
 ...
 ...

</RDF:RDF>
Run Code Online (Sandbox Code Playgroud)

插入这些:

<RDF:Description RDF:about="urn:mimetype:handler:application/x-bittorrent"
               NC:alwaysAsk="false"
               NC:saveToDisk="false">
 <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/transmission-gtk"/>
 <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-bittorrent"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-bittorrent"
               NC:prettyName="transmission-gtk"
               NC:path="/usr/bin/transmission-gtk" />
<RDF:Description RDF:about="urn:handler:local:/usr/bin/transmission-gtk"
               NC:prettyName="transmission-gtk"
               NC:path="/usr/bin/transmission-gtk" />

<RDF:Description RDF:about="urn:mimetype:application/x-bittorrent"
               NC:fileExtensions="torrent"
               NC:description="BitTorrent seed file"
               NC:value="application/x-bittorrent"
               NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-bittorrent"/>
</RDF:Description>
Run Code Online (Sandbox Code Playgroud)

使容器看起来像这样:

<RDF:RDF ... ...>
 ...
 ...
 
 ...
 ...

 <RDF:Description RDF:about="urn:mimetype:handler:application/x-bittorrent"
               NC:alwaysAsk="false"
               NC:saveToDisk="false">
  <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/transmission-gtk"/>
  <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-bittorrent"/>
 </RDF:Description>
 <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-bittorrent"
               NC:prettyName="transmission-gtk"
               NC:path="/usr/bin/transmission-gtk" />
 <RDF:Description RDF:about="urn:handler:local:/usr/bin/transmission-gtk"
               NC:prettyName="transmission-gtk"
               NC:path="/usr/bin/transmission-gtk" />

 <RDF:Description RDF:about="urn:mimetype:application/x-bittorrent"
               NC:fileExtensions="torrent"
               NC:description="BitTorrent seed file"
               NC:value="application/x-bittorrent"
               NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-bittorrent"/>
 </RDF:Description>
</RDF:RDF>
Run Code Online (Sandbox Code Playgroud)

(步骤 2 快照) mimeType-edit-snap2

第 3 步:

保存并关闭文件。然后重启火狐。

  • 我的内容类型列表中没有名为“BitTorrent see file”的类型,似乎也没有添加新内容类型的方法。 (2认同)

Jan*_*ana 5

打开 Firefox preferences window。转到Applications选项卡,您应该会magnet在列表中看到。单击Always ask,如果传输未显示为选项,则单击Use other 并导航到/usr/bin您的文件系统。查找 transmissiontransmission-gtk并单击它。

来源:如何让 Firefox 在传输中打开磁力链接

如果magnet没有出现在应用程序选项卡中,那么您应该通过about:config如下说明执行此操作:

  • about:config在地址栏中键入,然后按 Enter。
  • 右键单击-> 新建-> 布尔值-> 名称: network.protocol-handler.external.magnet-> 值->true
  • 右键单击 -> 新建 -> 字符串 -> 名称: network.protocol-handler.app.magnet-> 值 -> /usr/bin/transmission
  • 确保network.protocol-handler.expose-all设置为true

来源:Firefox 中使用传输的磁力链接