RTorrent

rTorrent is a highly configurable torrent client based on libtorrent and ncurses.

Installation
Install :

Configuration
The RTorrent configuration is stored in the user's. A lot can be configured, for this reason, the configuration is divided in sections.

Basics
These options are pretty straightforward:

Watching a Directory
You can configure rTorrent to watch one or more directories for new torrent files and queue them automatically. You can also set a download directory for each watch directory (rather than downloading to the default download directory).

Ratio Handling
You can control seed time by making it dependent on each torrent's ratio. Each torrent is seeded for a minimum of min.set percent. if a total of upload.set has been uploaded. If upload.set is not reached, it will seed a maximum of max.set percent. Read the wiki on the libtorrent site for different ratio groups.

Adding a self-signed certificate
Some trackers use SSL certificates, however most are not signed for various reasons. rTorrent uses the database located in. You also may want to use HTTPS because some ISPs (like Comcast) perform bandwidth shaping, effectively slowing down BitTorrent (regardless of whether your use is legitimate).

Add a certificate (if the domain was mytracker.net and the port was 443):

You need to re-hash after adding a certificate:

Try with curl:

You should not get a warning regarding the self-signed certificate.

Restart rTorrent. If using the daemon:

Customizing the daemonizer
The Gentoo ebuild installs a good basic init script. However, it can be enhanced in various ways if needed. The following examples are completely optional.

Using screen as daemonizer (default)
TODO: Please write the screen specific part.

This is what's needed for using screen.

Change the the USER variable to your user account, or (better) a separate account.

Starting rTorrent in the background, and run at system boot:

Using dtach as daemonizer
A smaller alternative to the app-misc/screen package is. This is all what's needed for using dtach instead of screen.

Save this patch on your computer: {{FileBox|filename=rtorrentd-init.patch|lang=diff|1= --- /usr/portage/net-p2p/rtorrent/files/rtorrentd.init	2011-11-07 16:46:30.000000000 +0100 +++ /etc/init.d/rtorrentd	2013-12-21 10:55:01.251541772 +0100 @@ -15,13 +15,12 @@ 	env TERM="xterm" \ start-stop-daemon \ --start \ -			--make-pidfile \ --pidfile /var/run/rtorrentd.pid \ -			--background \ --user $USER \ --env HOME="${PWHOME:-/home/$USER}" \ -			--name rtorrent \ -			--exec /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent +			--exec /usr/bin/dtach -- -n /tmp/rtorrentd.dtach /usr/bin/rtorrent + +	pgrep --newest --uid $USER --exact rtorrent >/var/run/rtorrentd.pid eend $? } }}

Change the the USER variable to your user account, or (better) a separate account.

If needed, you can give access to group members of the configured user. Add this at the end of the start section of the init script:

Starting rTorrent in the background, and run at system boot:

Login as user, or execute as a group member to attach the rtorrentd session:

To detach the rtorrentd session again: press Ctrl-\ on the keyboard.

If the arrow keys don't work, enter this in one go instead:

When the arrow keys still don't work, start reading here.

Arrow keys not working
First check what TERM variable your terminal application uses, and set it in the init script.

Changing the TERM variable:

If the arrow keys still don't work, you may try to set TERM to "linux", even if your terminal application uses "xterm". Although this setting is wrong, it doesn't seem to matter that much currently. However, it's preferred to enable the arrow keys in the terminal application instead.

It is a known limitation of dtach (and screen?), that reattaching the session in another terminal, drops the working arrow keys.

Any terminal
Enter "keyboard transmit mode" and leave "keyboard transmit mode", using tput:

Konsole
If Konsole doesn't switch to "Application Cursor Mode", you can create custom key bindings. To create the .keytab file with hacked bindings:

Restart Konsole, and create a new profile with the key bindings named "Default (XFree 4) +AppCuKeys". If you set TERM="linux" in your init script, choose "Linux console" key bindings instead. Select this profile, when you reattached the rtorrentd session as a user.

XTerm
XTerm has "Enable Application Cursor Keys" in the toolbar, and you can set it by default in :

If there's no toolbar, rebuild XTerm:

Localization
Extra environment variable, if you set LANG in your users file. This doesn't affect translations, but only character set and sorting.

Modifying scheduling priority
If hashing operations appear a bit heavy, try adding this at the end of the start section of the init script:

Controlling rTorrent exit
By default, the application is closed by the TERM signal. A more graceful exit would be to issue the INT signal, which is equivalent to the + key press in the rTorrent interface. This way, seeding quota get a last chance to be reported to the tracker. A second + key press is TERM exit, without waiting for the trackers to respond. After that, a KILL signal is justified.

Changing exit signals, and 1 or more seconds waiting time: