Transmission

提供: ArchWiki
2017年1月29日 (日) 00:35時点におけるKusakata (トーク | 投稿記録)による版 (文字列「[[zh-CN:」を「[[zh-hans:」に置換)
ナビゲーションに移動 検索に移動

Transmission は軽量でクロスプラットフォームの BitTorrent クライアントです。多くの Linux ディストリビューションでデフォルトの BitTorrent クライアントとして使われています。

インストール

公式リポジトリには複数の選択肢があります:

ノート: The GTK client cannot connect to the daemon, so users wishing to use the daemon will need to consider using the Qt package for a GUI or the remote-cli package for a curses-based GUI.

GUI バージョンの設定

Both GUI versions, transmission-gtk and transmission-qt, can function autonomously without a formal back-end daemon.

GUI versions are configured to work out-of-the-box, but the user may wish to change some of the settings. The default path to the GUI configuration files is ~/.config/transmission.

A guide to configuration options can be found on the Transmission web site: https://trac.transmissionbt.com/wiki/EditConfigFiles#Options.

Transmission-daemon と CLI

transmission-cli のコマンド:

transmission-daemon: デーモンを起動。
transmission-remote: invokes the CLI for the daemon, whether local or remote, followed by the command you want the daemon to execute.
transmission-remote-cli: (requires transmission-remote-cli) starts the curses interface for the daemon, whether local or remote.
transmission-cli: starts a non-daemonized local instance of transmission, for manually downloading a torrent.
transmission-show: returns information on a given torrent file.
transmission-create: creates a new torrent.
transmission-edit: add, delete, or replace a tracker's announce URL.

デーモンの起動と停止

#ユーザーの選択 で説明されているように、transmission デーモンは以下の方法で実行できます:

  • As the user transmission, by running as root:
    # transmission-daemon
    The daemon can then be stopped with:
    # killall transmission-daemon
  • As your own user, by running under your user name:
    $ transmission-daemon
    The daemon can then be stopped with:
    $ killall transmission-daemon
  • systemctl を使って transmission サービスを起動 (停止) した場合 #ユーザーの選択 で設定したユーザーが使われます。systemd サービスの名前は transmission であり transmission-daemon ではありません。

デーモンを起動すると transmission の設定ファイルが作成されます。#デーモンの設定 を見て下さい。

An alternative option to stop the transmission daemon is to use the transmission-remote command:

$ transmission-remote --exit

ブート時に自動起動

システムの起動時に transmission デーモンが実行されるようにするには、systemd を使います。

Note that the name for the systemd service is transmission, not transmission-daemon.

The daemon is started after network.service was initialised. However, if you enable the service dhcpcd as opposed to the device-specific service, such as dhcpcd@enp1s0.service for example, it may happen that Transmission is started too early and cannot bind to the network interface. Thus, the web interface is unreachable. A possible solution is to add the Requires line to the unit's configuration file:

/etc/systemd/system/transmission.service.d/fixdep.conf
[Unit]
Requires=network.target

ネットワークに接続された時に起動

Wicd

Create a start script in folder /etc/wicd/scripts/postconnect, and a stop script in folder /etc/wicd/scripts/predisconnect. Remember to make them executable. For example:

/etc/wicd/scripts/postconnect/transmission
#!/bin/bash

/usr/bin/transmission-daemon
/etc/wicd/scripts/predisconnect/transmission
#!/bin/bash

killall transmission-daemon

ユーザーの選択

transmission を動かす方法を選択してください:

  • 別のユーザーで動かす、デフォルトは transmission (セキュリティが良くなるので推奨)。

By default, transmission creates a user and a group transmission, with its home files at /var/lib/transmission/, and runs as this "user". This is a security precaution, so transmission, and its downloads, have no access to files outside of /var/lib/transmission/. Configuration, operation, and access to downloads needs to be done with "root" privileges (e.g. by using sudo).

  • ユーザーの下で動かす

セットアップするには、サービスファイルを上書きしてユーザー名を指定してください:

/etc/systemd/system/transmission.service.d/username.conf
[Service]
User=your_username

デーモンの設定

デーモンを起動して設定ファイルを作成してください。

  • If running Transmission under the username transmission, the configuration file will be located at /var/lib/transmission/.config/transmission-daemon/settings.json.
  • If running Transmission under your own username, the configuration file will be located at ~/.config/transmission-daemon/settings.json.

One can customize the daemon by using a Transmission client or using the included web interface accessible via http://localhost:9091 in a supported browser.

A guide to configuration options can be found on the Transmission web site: https://trac.transmissionbt.com/wiki/EditConfigFiles#Options

ノート: If you want to edit the configuration manually using a text editor, stop the daemon first; otherwise, it would overwrite its configuration file when it closes.
ノート: Alternatively, the daemon can be instructed to reload its configuration with SIGHUP, by running kill -s SIGHUP `pidof transmission-daemon`.

A recommendation for those running under username transmission is to create a shared download directory with the correct permissions to allow access to both the transmission user and system users, and then to update the configuration file accordingly. For example:

# mkdir /mnt/data/torrents
# chown -R facade:transmission /mnt/data/torrents
# chmod -R 775 /mnt/data/torrents

Now /mnt/data/torrents will be accessible for the system user facade and for the transmission group to which the transmission user belongs. Making the target directory world read/writable is highly discouraged (i.e. do not chmod the directory to 777). Instead, give individual users/groups appropriate permissions to the appropriate directories.

ノート: If /mnt/data/torrents is located on a removable device, e.g. with an /etc/fstab entry with the option nofail, Transmission will complain that it cannot find your files. To remedy this, you can add RequiresMountsFor=/mnt/data/torrents to /etc/systemd/system/transmission.service.d/transmission.conf in the section [Unit].

監視ディレクトリ

If you want to Automatically add .torrent files from a folder, but you find that the watch-dir and watch-dir-enabled options set in the config file do not work, you can start the transmission daemon with the flag -c /path/to/watch/dir.

If you're using systemd, edit the unit file located at /lib/systemd/system/transmission.service.

参照