Karla News

Using and Configuring Rtorrent

BitTorrent

Using bittorrent software is inately CPU intensive as it takes many cycles to churn the amount of data coming and going. Because of this, it makes sense for one to want the slimmest bittorent software available while still having a feauture-rich application. Out of all the types of bittorent software, rtorrent has excelled in terms of efficiency and how little of a footprint it leaves while running.

Installing rtorrent is as easy as using your distribution’s package manager. On Gentoo we install using emerge:

# emerge rtorrent

If you are using the new IPV6 protocol, make sure you’ve enabled the ipv6 USE flag using one of three different options:

[First Option] [RECOMMENDED!]

Open up your favorite text editor and edit the make.conf file to include the ipv6 USE flag in the USE section of the file:

# vim /etc/make.conf

Find the USE section and add in the ipv6 string in the section so it looks something like this:

USE=”-qt3 -qt4 -arts -kde -eds ipv6 opengl”

Make sure there is a space separating ipv6 from the other USE flags, then save the text file and install rtorrent:

# emerge –newuse rtorrent

[Second Option]

# echo “net-p2p/rtorrent ipv6” >> /etc/portage/package.use

# emerge rtorrent

[Third Option]

# USE=”ipv6″ emerge rtorrent

Using the above command will result in the ipv6 USE flag to be disabled next time rtorrent is installed as this make the USE flag temporary.

Once rtorrent is installed, we need to create a configuration file for rtorrent to be able to do what we want. This is how we control permanent settings in rtorrent. First, we have to download the .rtorrent.rc file:

Rtorrent Configuration File If you downloaded the file to your Desktop, lets move this file to our home directory (substitute your username for username):

$ mv /home/username/Desktop/.rtorrent.rc ..

The double period means to move up one directory, so from Desktop up to your home directory.

We need to edit the .rtorrent.rc file to make use of the options provided within as they are all commented out:

See also  Best Buy and Geek Squad Took Our Computer and Ruined It

$ vim /home/username/.rtorrent.rc

Let’s uncomment the options we need (uncommenting means to remove delete the # symbol). So let’s take out the # symbol from these options:

min_peers
max_peers
min_peers_seed
max_peers_seed
max_uploads
download_rate
upload_rate
directory
session
schedule = watch_directory
schedule = low_diskpace
schedule = ratio
ip = 127.0.0.1
port_range
check_hash
use_udp_trackers
encryption
peer_exchange
dht

Now that these are all uncommented, we can change the values of each of these preferences to suit our needs. What one chooses is dependant on the computer and internet specifications. The .rtorrent.rc file explains what each preference does so change the values to what you want.

For “The ip address reported to the tracker” change the default value of 127.0.0.1 (which is your localhost address) to your public/external IP address if you are doing a a direct connection. If you are behind a router, and have a private/internal IP address (for example: 192.168.1.101), make sure you use this address.

For the port range, set the port range you use to forward your bittorrent connections. If you use only one port number set that number twice. If your open port was 57842, then you would set your port range like:

port_range = 57842-57842

For check hash, change the no to yes. This will check the downloaded files after they are finished to see if there are any corruptions, and if so, the client will redownload the portions that are corrupted until all the files are cleanly obtained.

When setting the default directory, make sure to use an absolute path, as I’ve had issues with running relative paths and permission errors. So, instead of using ~/Desktop, we would use /home/username/Desktop. You can change the download directory to a directory that’s located on an external drive, just make sure it’s plugged in before running your client.

The session directory is an important part to configure. This directory is used by rtorrent to store information about the torrents that are used. It tells how much has been downloaded, whether it’s finished, if it’s seeding, and other things. This is key when recovering data. If for some reason rtorrent crashes, your data from your previous session will be used and you’ll be right on track the next time rtorrent is used. When choosing a directory, make sure you have user permissions on it.

See also  Bittorrent Tutorial: How to Download Music and Movies Files

The watch directory is where the torrent files will go for rtorrent to use. Let us say rtorrent is running and you have everything configured. You set your watch directory as your desktop. Now you find a torrent file from the internet and download the file to your desktop. Rtorrent will see that a .torrent file is now on your desktop and will read the information from it to begin downloading the respective files. If you downloaded the torrent file to your home folder, rtorrent would not see it until you moved it to your desktop.

Here is an example of how to set up your session and watch directories:

First I will create a directory called .rtorrent and place it in my home directory. Next, I create a session and a watch-torrents directory inside the .rtorrent directory. To set up rtorrent to use these directories I would set up my options like this in my .rtorrent.rc file:

[Session]

session = /home/jaren/.rtorrent/session

[Watch Directory]

schedule = watch_directory,5,5,load_start=/home/jaren/.rtorrent/watch-torrents/*.torrent

After saving all these options in our .rtorrent.rc file, we can fire up rtorrent to use.

Using the Interface

When trying to figure out all the keyboard commands in order to use rtorrent, look at the rtorrent website for a complete rundown of the commands.

Rtorrent User Guide

While this is nice, it can be a bit overwhelming. I’ll show you the most basic of commands to use in order to use rtorrent efficiently.

**NOTE**The caret symbol seen on the user guide (the ^ symbol) means to use the control (ctrl) key and the corresponding key after it.

If you want to change the max download and upload speed of your client (this is called throttling), you can use the letters: a,s,d,z,x,c

To increase the upload speed, you would use the letters a,s, and d. These will increase the upload by 1,5, and 50 kilobytes (KB) respectively. To do the same thing for download speed, you would use theupper-case form of a,s, and d. These will increase at the same rate respectively.

See also  The Year's Best Nintendo 3DS Racing Games

To decrease the upload speed, you would use the letters z,x, and c. These will decrease the upload by 1,5, and 50 kilobytes (KB) respectively. To do the same thing for download speed, you would use the upper-case form of z,x, and c. These will decrease at the same rate respectively.

To quit running rtorrent, press control and “q” (^q). This will stop rtorrent and exit the program.

Use the arrow keys to move around on the rtorrent screen; the left and right arrow keys will navigate deeper in the torrents to provide more information.

To stop/pause an active torrent, press control and “d” (^d). To delete it, press ^d once more. To start the torrent back up again, press control and “s” (^s).

To change how to view rtorrent, use the number keys:

[1] shows all the torrents
[2] shows all the torrents in alphabetical order
[3] shows all started torrents
[4] shows all stopped torrents
[5] shows all completed torrents
[6] shows all incomplete torrents
[7] shows all torrents that are currently hashing
[8] shows all torrents that are seeding (completed)

Using these basic commands, one should be able to get rtorrent running and should be able to use it just like a standard GUI-based bittorrent client. Again, for more information on how to use rtorrent’s interface, refer to the user guide here linked above.

Rtorrent is an excellent bittorrent client that is very fast in comparison to other bittorrent clients and highly configurable with many options making rtorrent a feature rich application.

Reference: