Difference between revisions of "Transmission"

From ArchWiki
Jump to: navigation, search
(improve readability: reduce tree depth by removing the Setup section, which didn't contain text per se)
m (Starting and stopping the daemon: "daemon" in this context can be a bit ambiguous, change to "service')
Line 30: Line 30:
 
As explained in [[#Choosing a user]], the {{ic|transmission}} daemon can be run:
 
As explained in [[#Choosing a user]], the {{ic|transmission}} daemon can be run:
  
* As a {{ic|transmission}} user by starting the {{ic|transmission}} daemon [[systemd#Using units|using systemd]].
+
* As a {{ic|transmission}} user by starting the {{ic|transmission}} service [[systemd#Using units|using systemd]].
 
: Alternatively you can run, as root:
 
: Alternatively you can run, as root:
 
: {{bc|# transmission-daemon}}
 
: {{bc|# transmission-daemon}}

Revision as of 03:22, 24 February 2014

zh-CN:Transmission Transmission is a light-weight and cross-platform BitTorrent client. It is the default BitTorrent client in many Linux distributions.

Installation

There are several options in official repositories:

Note: The gtk client cannot connect to the daemon, so user wishing to use the daemon will need to consider using the qt package for a gui or the remote-cli package for a curses gui.

GUI versions setup

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

Configuring the GUI version

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 website: https://trac.transmissionbt.com/wiki/EditConfigFiles#Options.

Transmission-daemon setup

Starting and stopping the daemon

As explained in #Choosing a user, the transmission daemon can be run:

  • As a transmission user by starting the transmission service using systemd.
Alternatively you can run, as root:
# transmission-daemon
  • As your own user by running:
$ transmission-daemon

Starting the daemon will create an initial transmission configuration file. See #Configuring the daemon.

Autostart at boot

Enable the transmission daemon to run at system start, using systemd.

Run only while connected to network

Netctl

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Todo (Discuss in Talk:Transmission#)
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.

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

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

killall transmission-daemon
NetworkManager

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Todo (Discuss in Talk:Transmission#)

Choosing a user

Choose how you want to run transmission:

  • As a separate user, transmission by default (recommended for increased security).

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).

  • Under the user's own user name.

To set this up, override the provided service file and specify your username:

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

Configuring the daemon

Create an initial transmission configuration file by starting the daemon.

  • 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 user name, the configuration file will be located at ~/.config/transmission-daemon/settings.json

Customize the options using a transmission client or using the included webinterface accessible via http://localhost:9091 in a supported browser.

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

Note: 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:
$ transmission-remote --exit

A recommendation for those running under user name transmission is to create a shared download directory with the correct permissions to allow access to both the transmission user and system users, and 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/writible is highly discouraged (i.e. do not chmod the dir to 777). Instead give individual users/groups appropriate permissions to the appropriate folders.

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

See also