SARPi Project - Slackware Linux on a Raspberry Pi
Install rTorrent on Slackware Linux on the Raspberry Pi
This SARPi mini-project will enable you to install, configure, and run rTorrent on Slackware Linux on a Raspberry Pi. rTorrent is a ncurses BitTorrent client which uses the libTorrent library and is written in C++. It's a ncurses-based command line torrent client for high performance, which has almost no overhead, uses minimal resources, and is programmed with an emphasis on speed and efficiency, while delivering equivalent features to those found in GUI based clients. rTorrent supports the saving of sessions, partial downloading of multi-file torrents, and allows the user to add and remove torrents on-the-fly. BitTorrent protocol encryption, PEX, DHT, and initial seeding is also supported.
Quick Links
• What you will need for this project
• Logging In and Checking the System
• Build and Install libTorrent
• Build and Install rTorrent
• Configuring rTorrent - rtorrent.rc
• Running rTorrent for the first time
•
What you will need for this project
• A Raspberry Pi running Slackware ARM / AArch64 Linux.
• curl installed on your system.
• libsigc++ installed on your system.
• Internet connection to download libtorrent GitHub repo source and build a Slackware package with it.
• Internet connection to download rtorrent GitHub repo source and build a Slackware package with it.
• Internet connection or some means of downloading / transferring *.torrent files onto your system. [examples offered]
The Slackware packages required to install rtorrent are available from SARPi Downloads if you're not confident in building them yourself using remote repository sources.
You can use any currently available version of Slackware Arm / AArch64 Linux installed on any revision of Raspberry Pi for this task.
We will be using Slackware 15.0 ARM on a Raspberry Pi 4. The HOSTNAME of the system is 'endo'.
•
Logging In and Checking the System
First, we're going to log in as 'root' user and 'cd' to the '/tmp' directory:
It's always good policy when logging in to check the current system time (using the 'date' command for example). This is to make sure the system time is relatively accurate before running 'slackpkg update' or updating / installing any software on your Slackware Linux system.
Check for curl and libsigc++
The first thing you should do is check to see if curl and libsigc++ packages are installed on your system. Do this by typing the following commands and pressing :
root@endo:/tmp# ls /var/log/packages/ | grep libsigc++
Or, you could also do this:
root@endo:/tmp# slackpkg search libsigc++
The results from these commands will let you know which of these packages are installed. If you can see that both are present then it's all good.

If you don't already have curl and/or libsugc++ then type the following command and press to install the packages:
•
Build and Install libTorrent
Fortunately libTorrent has a Github repository which can be cloned (downloaded) and used to build a Slackware package.
The libtorrent Slackware package is available from SARPi Downloads if you're not confident in building it yourself.
First we're going to visit SlackBuilds.org and download the source tarball and the SlackBuild scripts:
From this page we'll download this file:
Then we'll decompress it:
That will have created a new directory with all the SlacBuild files in it. So we'll 'cd 'to it and download the source tarball:
root@endo:/tmp/libtorrent# wget https://github.com/rakshasa/libtorrent/archive/v0.16.6/libtorrent-0.16.6.tar.gz
Then we just run the libtorrent.SlackBuild script by typing the following and pressing :
Once that process has completed. we should have a package read to install in the /tmp/ directory.
SBo/ libtorrent/ libtorrent-0.16.6-arm-1_SBo.tgz libtorrent.tar.gz
And we have! The 'libtorrent-0.16.6-arm-1_SBo.tgz' is the package file and we will 'cd' to that directory in order to install it:
root@endo:/tmp# installpkg libtorrent-0.16.6-arm-1_SBo.tgz
After which you suould see the following screen:

That's the first 'libtorrent' package installed. Now we need to do exactly the same thing with rtorrent.
•
Build and Install rTorrent
Fortunately rTorrent also has a Github repository which can be downloaded and used to build a Slackware package (exactly the same as what we did with libTorrent). So this should be relatively easy.
The rtorrent Slackware package is available from SARPi Downloads if you're not confident in building it yourself.
First we'll visit SlackBuilds.org and download the source and the SlackBuild scripts tarball:
From this page we'll download this file:
Then we'll decompress it:
That will have created a new directory with all the SlacBuild files in it. So we'll 'cd 'to it and download the source tarball:
root@endo:/tmp/rtorrent# wget https://github.com/rakshasa/rtorrent/releases/download/v0.16.6/rtorrent-0.16.6.tar.gz
Then we just run the rtorrent.SlackBuild script by typing the following and pressing :
One that process has completed. we should have a package read to install in the /tmp/ directory.
SBo/ rtorrent/ rtorrent-0.16.6-arm-1_SBo.tgz rtorrent.tar.gz
And we have! The 'rtorrent-0.16.6-arm-1_SBo.tgz' is the package file and we will 'cd' to that directory in order to install it:
root@endo:/tmp# installpkg rtorrent-0.16.6-arm-1_SBo.tgz
After which you suould see the following screen:

That's the 'rtorrent' package installed. Now we have all we packages installed in order to run rtorrent.
However, we need to configure the 'rtorrent.rc' file before we can run the rTorrent client. This file is included in the rtorrent package that we've just installed, but it's not in the correct location on our system. We should move it into a /home/user directory where it is supposed to reside, but we shouln't use 'root' to do this. We should use our normal user account. We haven't logged in with our normal user account yet because we've been using 'root' to build and install package. We should address the 'rtorrent.rc' file now.
•
Configuring rTorrent - rtorrent.rc
We have logged in with our normal user account in order to configure the 'rtorrent.rc' file. Our username is 'dave'.
We are located in the root of out '/home/dave' directory. We check this using the 'pwd' command:
/home/dave
Now we can copy the 'rtorrent.rc' file from the docs directory. However, we need to change its filename in the process. So we do this:
We check that the file has been copied as expected:

Now we're going to edit this file using 'nano' and specify three directories for rtorrent to use. The first directory will be the downloads directory where rtorrent will save downloaded torrents. The second directory will be the session directory that stores all the information on active torrents. The third directory will be the watch directory that rtorrent periodically scans for new torrent files.
So we open rtorrent.rc using nano by entering the following at the command prompt and pressing :
In this rtorrent.rc file we need to find a line that reads "Default directory to save the downloaded torrents." and enter the following line below it:
So the section looks like the following:

Next, in the rtorrent.rc file we need to find a line that reads "Default session directory." and enter the following line below it:
So the section looks like the following:

Next, in the rtorrent.rc file we need to find a line that reads "Watch a directory for new torrents, and stop those that have been deleted." and enter the following line below it:
So the section looks like the following:

Once these lines have been added to the rtorrent.rc file it whould look sim,ilar to this:

We've left the original example lines untouched in the file and just added our own underneath them.
Once we're happy with the directories that have been defined, we exit and save the file.
Now we need to create the directories that match those we've specified in the rtorrent.rc file. So it's just a case of typing the following at the command prompt and pressing :
dave@endo:~$ mkdir -p rtorrent/session
dave@endo:~$ mkdir -p rtorrent/watch
We can view the directories we've just created for rtorrent using the 'tree' command:

Incidentally, you don't have to use the same directories as we have for rtorrent. They can be named and structured whatever suits you. We've just chosen to keep them all together in the same rtorrent directory because it's easier to manage.
Now that the editing of .rtorrent.rc file is complete we can move on and start thinking about running rTorrent for the first time on our system.
•
Running rTorrent for the first time
It goes without saying but, while running rTorrent it's always prudent to remember to NEVER download more data than what you have storage space for.
Your Slackware Linux system (or any other system for that matter) does not take kindly to you filling partitions to the hilt with data! Make sure what you're downloading isn't going to take up your entire storage space.
To keep 'rtorrent' actively running in the background we will start a 'screen' session first.
And then once indide the screen session we will start rtorrent:
When rtorrent first starts up there is no activity or existing torrents to resume.

So we press + + keys together at the same time, to detach from the rtorrent screen session.
We need some *.torrent files to download. What better files to use than Slackware torrents? We know that *.torrent files reside in 'rtorrent/watch' directory so we'll 'cd' into there and download the Slackware 15.0 (latest stable) DVD torrents. Like this:
dave@endo:~$ wget https://seedbox.slackware.uk/torrents/slackware-15.0-install-dvd.torrent
dave@endo:~$ wget https://seedbox.slackware.uk/torrents/slackware64-15.0-install-dvd.torrent
Then when we want to attach back to the 'torrent' screen session we type the following at the command prompt and press :
Now, with the Slackware *.torrent files present in the 'rtorrent/watch' directory, rtorrent will autodetect them and start processing them:

Give it a few minutes to download and complete.

Now we have our Slackware files fully downloaded in the 'rtorrent/downloads' directory. We can leave them where they are to share with others, move them, or delete them.
What we did with the Slackware torrent files we can do with any torrent files, they all work in exactly the same way.
That just about wraps up this SARPi mini-project for installing and configuring rtorrent. If you're interested in learning more about this software then the best place to start would be the rTorrent Wiki
.•
Thanks & Credits!
Thank you for reading and taking part in this rTorrent mini-project. We trust other Slackware users will find it useful, informative, interesting, and hopefully fun too. We sure did here at SARPi Project while we were creating it.
Thanks and perpetual gratitude to Patrick Volkerding, and the entire Slackware Team of developers, for producing a truly wonderful OS. Without you, and the work you do, the SARPi Project would not exist.
Thanks to Jari Sundell (rakshasa) for libTorrent and rTorrent.
