Saturday, March 21, 2009

Updated Transmission

Transmission has released an updated version since my previous post about it (although that version I was using happened to be a bit out dated at the time of writing...oops). This post is about Transmission 1.51 (7970) installed on Ubuntu 8.10 Server.

To start, make sure you have the correct repositories added to the listing located at "/etc/apt/sources.list". The lines to add read:
deb intrepid main
deb-src intrepid main
If you are using a different version of Ubuntu, substitute the word "intrepid" for the name associated with your version. 6.06 is "dapper", 8.04 is "hardy", 8.10 is "intrepid", and 9.04 is "jaunty" (9.04 is still in alpha, it gets released next month). Next you'll need to enter the following two commands at the Terminal:
gpg --keyserver --recv 976b5901365c5ca1
gpg --export --armor 976b5901365c5ca1 | sudo apt-key add -
These together will import the necessary keys to verify the signatures on the Transmission packages. Update the package manager with this command:
sudo aptitude update
Now you can install the Transmission CLI package with:
sudo aptitude install transmission-cli
This installs transmissioncli, a client that runs in the foreground, transmission-daemon, a client that runs in the background, and transmission-remote, a program that controls the daemon. The daemon and associated remote are the tools I use and the updated versions of them are even nicer than what I was using before.

Set a few preferences associated with the daemon:
transmission-daemon -b -L 2000 -l 500
The -b flag enables peer blocklists. These lists contain known bad IPs so its a good idea to not connect to them. the -L flag sets the global max number of peers you can connect to. A high number is good here. The -l flag sets the max number of peers each torrent can use. Keep in mind that if you set a high number for these without adjusting any settings on your router it can actually slow down your connection speed. Settings for the daemon are stored in "~/.config/transmission-daemon/settings.json".

Set your preferences associated with the remote:
transmission-remote -D -U -m -er -p [port] -w /path/to/downloads
The -D and -U flags set the max download and upload speeds to unlimited, respectively. To limit these speeds, substitute the capital letter for its lower case counterpart followed by an integer number of KBps. The -m flag enables UPnP. This needs to be enabled in your router in order to work. The -er flag requires that connected peer use encryption. Alternatively, this could be switched to -ep for encrytion preferred or to -et for encryption tolerated. The -p flag sets what port to use for incoming peer connections. The -w flag sets the default download location.

If at any time you are unable to connect to the daemon, you may have a port error. The daemon accepts connections from peers on one port and it listens to instructions from the remote on another port. To set the port that the remote talks to the daemon on, try this:
transmission-remote -P 9091
Port 9091 is the default port the daemon listens on for instructions. Now its time to start downloading. To add a torrent:
transmission-remote -a /path/to/file.torrent
To list all downloads:
transmission-remote -l
If you want to manipulate any torrents, you need to first select them:
transmission-remote -t [torrent]
The -t flag can work with bunch of different options. To select a torrent you will need to follow the -t with either the .torrent file, the torrent's hash, for its ID number. The easiest way of using the -t flag is with the ID, in my opinion. When you list all the torrents, the ID is listed in the first column.

To remove a torrent:
transmission-remote -t [id] -r
To list all the files in a torrent:
transmission-remote -t [id] -f
By default, you will be downloaded all of these files. If you don't want all of them, you can set this with the -G flag followed by the file ID. If you decide later on that you do, indeed want them, you can set this with the -g flag. For example:
transmission-remote -t [id] -G 1,3,5-9
transmission-remote -t [id] -g 5,7-9
transmission-remote -f [id] -g all
The first command says to not download files numbered 1, 3, and 5 through 9. The second command says to start downloading files numbered 5 and 7 through 9. The third command says to download all files in the torrent.

You can also set the priority for given files in a torrent using a similar syntax. The flags to use are -ph, -pn, and -pl for priority high, normal, and low. For example:
transmission-remote -t [id] -ph 4
transmission-remote -t [id] -pl 2,6-8
transmission-remote -t [id] -pn all
The first command sets file number 4 to high priority. The second command sets files numbered 2 and 6 through 8 to low priority. The third command sets all files to normal priority. By default, all files are set to normal priority.

This is only a handful of the options available. To learn more, check out the manuals or help listings with:
man transmission-daemon
man transmission-remote
transmission-daemon -h
transmission-remote -h
Happy downloading.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.