Your Ad Here

Tuesday, April 6, 2010

rTorrent: Recieve text messages when torrents are done! (With Gmail)

Maybe you have heard of rTorrent, maybe you haven't. But here's a little trick you should use that will make rTorrent your favorite torrent client!

*NOTE: These instructions are for Arch Linux. Your mileage may vary.

First, let's get/update rTorrent

# pacman -Sy rtorrent
(If you installing rtorrent for the first time, please follow these instructions to get everything else setup)

And we'll need Heriloom's mailx program.

# pacman -S mailx-heirloom

Alrighty. Now, we're going to delete the /etc/nail.rc and then remake it.

# rm /etc/nail.rc
# touch /etc/nail.rc

Now edit with your favorite editor (I chose nano, but anything should work)
# nano /etc/nail.rc
And add this. (Where USERNAME is your username for gmail and PASSWORD is your password for gmail)
set smtp-use-starttls
set ssl-verify=ignore
set ssl-auth=login
set smtp-auth-password=PASSWORD

Okay, now let's create our script.
$ touch ~/

Okay so here's where you need to find out what your email-to-text is.
Former AT&T customers:
Virgin Mobile:
Alltel: OR

I have sprint, but change the script to fit your needs.

So let's edit out script.
$ nano ~/
And add
echo "$@: Done" | mailx
Now we need to make it executable.
$ chmod +x ~/

Okay that's done. Basically, what that's going to do is take whatever is passed to it ($@): Done and pipe it through mailx which goes back to /etc/nail.rc to login into your gmail account and send you an SMS.

Now, we need to add a line to the bottom our ~/.rtorrent file (you should have one, if not go back to the top)
$ nano ~/.rtorrent
and add:
system.method.set_key =,notify_me,"execute=~/,$d.get_name="

So say you were downloading "Completely-Legal-Files.rar". When it gets done, you'll get a text message that says "Completely-Legal-Files.rar: Done"

Oh happy day! Now you can rush home and un-rar it!

No comments:

Post a Comment