Torrent Multi User Client

Introduction

There are several ways to make a torrent client that can be remote controlled. I’ve decided to use Azureus, as I have good experience with it. And it can be remote controlled.
Some will say that it’s not a good idea to run xorg on a server. Unfortunately I have no choice because I want to use azureus! I tried torrentflux, but It didn’t work very well. Actually catastrophic comes to mind 🙂

xorg server

To get azureus going I need the xorg server. So I’ll install it.

[root@Server]$ pacman -S xorg-server xorg-xkb-utils xorg-xauth xorg-server-utils xorg-xinit xf86-video-vesa xf86-input-mouse xf86-input-keyboard

And the driver for my graphics card.

[root@Server]$ pacman -S xf86-video-mga

Make a default configuration for the server with

[root@Server]$ Xorg -configure

Copy the config file to the correct folder

[root@Server]$ cp /root/xorg.conf.new /etc/X11/xorg.conf

Change the xorg server configuration if necessary. Then install the following to test the server

[root@Server]$ pacman -S xterm xorg-twm

I probably don’t need the next package. I just normally install those fonts. 😉

[root@Server]$ pacman -S ttf-dejavu

Then run

[root@Server]$ startx

If everything is OK, you should see the three console windows in a graphic window.
Shut down the xorg server with CTRL-ALT-BACKSPACE

Install enlightenment with

[root@Server]$ pacman -S enlightenment

To make it start with the startx command change /etc/X11/xinit/xinitrc to include

exec e16

and remove all other lines starting other programs.

Now startx will startup enlightenment.

Azureus

As azureus need the java runtime environment, make sure it’s installed.

[root@Server]$ pacman -S jre

java-gcj-compat can not be used, because the AzSMRC plugin only works with suns jre (at least it did in my setup)

Now install azureus

[root@Server]$ pacman -S azureus

You should be ready now. Just run startx, and then run azureus.
You’ll probably have to start azureus from a terminal window.
To make a menu entry edit the file in ~/.e16/menus/menus_Other/Network.menu and add

“Azureus” “/usr/share/pixmaps/Azureus.png” exec “azureus”

NOTE! If you only get squares instead of characters when you start up azureus, you may be missing the package sdl_pango. Just install it with

[root@Server]$ pacman -S sdl_pango

AzSMRC Remote Control System

Now we need the multiuser remote access environment. I have chosen to use AzSMRC. You can find details on the azureus webpage.

Download the zip file from the azureus plugins website, and copy it to the server. Or use wget (through a ssh session) to download it directly to the server.

[root@Server]$ wget http://azureus.sourceforge.net/plugins/azsmrcPlugin_0.9.9.zip

At the moment of writing this guide the latest version was 0.9.9

Now go ahead and startup azureus. Then goto the menu Plugins -> Installation Wizard.
In the window that popup you have to select Choose By File and press next. Now browse to the file you downloaded, and follow the on screen instructons.
Azureus needs to be restarted before the plugin works, so for now just exit Azureus.

Filesystem setup

Before we proceed we have to make the directories we need. I have decided to make two users with their own directories.

[root@Server]$ cd /home
[root@Server]$ mkdir torrentdata
[root@Server]$ cd torrentdata
[root@Server]$ mkdir default_download
[root@Server]$ mkdir user1
[root@Server]$ mkdir user2
[root@Server]$ mkdir user1/import
[root@Server]$ mkdir user1/output
[root@Server]$ mkdir user2/import
[root@Server]$ mkdir user2/output
[root@Server]$ chown -R user1.users user1
[root@Server]$ chown -R user2.users user2
[root@Server]$ chmod -R 775 /home/torrentdata

Samba sharing

To be able to access the downloaded content over the lan, we need to share the data. I use samba for that.
Add the following to /etc/samba/smb.conf to share the files that azureus downloads.
The user will only have access to his own files.

[torrentdata]
  comment = Torrent files
  path = /home/torrentdata/%U
  browseable = yes
  writeable = no
  valid users = @sambausers

This entry is an addition to my samba server setup found elsewhere on this website.

AzSMRC User Setup

When you startup azureus again, you will have an extra tab called AzSMRC. Use the username and password supplied in the readme file to login, and then create the users you need.
Make sure to use the directories we made earlier for the users output files and automatic import files.

You also need to make a little change in the azureus settings. Make sure the default directory is set under Files, and that you have selected “Automatically download to default directory”. The files will be downloaded to this directory and automatically moved to the users output directory when the download has finished.

Go ahead and enjoy your torrent grabbing machine 😉

References

Azureus homepage
AzSMRC Homepage