I found that I needed to change the permission of /dev/ptmx to get screen to work for non-root users:

+

I found that I needed to change the permission of /dev/ptmx to get screen to work for non-root users. Log in as root, then:

$ chmod 666 /dev/ptmx

$ chmod 666 /dev/ptmx

Revision as of 04:29, 25 August 2007

rTorrent is a console-based BitTorrent client with a focus on efficiency. Ths guide describes how to set up rTorrent on the LSPro with screen, and to start/pause/resume a torrent by monitoring a watch directory. I am a new linux user myself so feel free to improve the commands I used.

The procedure was performed with the jtymod5 firmware but should work on stock firmware as well.

# Watch a directory for new torrents, and stop those that have been deleted.
schedule = watch_directory,5,5,load_start=/mnt/disk1/share/torrents/watch/*.torrent
schedule = tied_directory,5,5,start_tied=
schedule = untied_directory,5,5,stop_untied=

The first schedule line tells rtorrent which directory to scan for new *.torrent files. It will start 5 seconds after rTorrent is started, and will repeat every 5 seconds. The third line pauses a download when the associated .torrent file is removed from the watch directory. The second line tells rtorrent to resume a download when the .torrent file is put back in the watch directory.

This way you can simply move torrent files in and out of the watch directory to control which files get downloaded.

# Set whether the client should try to connect to UDP trackers.
use_udp_trackers = yes

8.

# Encryption options
encryption = allow_incoming

Running rTorrent

Using Screen

screen is a terminal windows manager that allows you to run a terminal in the background. This way, you can start rTorrent in a virtual terminal, send it to the background, and log off your current session.

Step 1) Create a virtual terminal named 'torrent_box'

$ screen -S torrent_box

You should now get a blank terminal.

Step 2) Run rTorrent

$ rtorrent

Step 3) Send it to the background

Press Ctrl+a+d (Ctrl+a, then press d)

You should see the status [detached] and return to your old terminal. To see which virtual terminals are present, you can use the command:

$ screen -list

The torrent_box screen should be visible. Now you can log off and rTorrent will continue to run.

Seeing the Status of Your Torrents

To return to the rTorrent screen, use the command:

$ screen -r

Always remember to press Ctrl+a+d to send it back to the background before logging off.

See the rTorrent user guide to learn how to work with the rTorrent interface.