The Ultimate DNS-323 Setup: Part 3 – Transmission Installation & Configuration

DNS323 — Mark @ 3:55 pm

Installation of Transmission BitTorrent Client

From your desktop computer, visit http://www.transmissionbt.com/download.php. You are not looking for an official package; you are looking for the source code. Right click on the bz2 version and click ‘Copy Link Location’. SSH to your DNS-323 and using an unprivileged account, use wget to save the source code on the device (anywhere).

Example: wget http://download.transmissionbt.com/files/transmission-2.04.tar.bz2

Extract the source code: tar -jxvf  transmission-2.04.tar.bz2

Change dir to the source and build the program:

cd transmission-2.04

./configure –enable-daemon

make

As root or by using sudo:

make install

Transmission should now be successfully installed.

Configuring Transmission for Remote Control

To configure Transmission we will first launch it so it will create a default configuration. This includes a dirctory to store settings, torrent resume files, etc.

As a non-root user:

transmission-daemon –g /mnt/HD_a2/Volume_1/.transmission-daemon

Leave Transmission running for half a minute so it has time to start-up and create the files. To shutdown Transmission, from the command line:

pidof transmission-daemon | xargs  kill

Or if it’s easier to remember, use two commands:

pidof transmission-daemon
kill <number from pidof command>

Now we can edit the default Transmission configuration. It is located in/mnt/HD_a2/Volume_1/.transmission-daemon/settings.json (or Volume_0 depending on which HDD bay your using)

You can view the configuration options available fromhttp://trac.transmissionbt.com/wiki/ConfigurationParameters. The options we are primarily interested in are those that will enable remote operation of Transmission.

In settings.json add/modify the following:

“rpc-enabled”: true,
“rpc-bind-address”: “0.0.0.0″,
“rpc-port”: 9091,
“rpc-authentication-required”: false,
“rpc-username”: “”,
“rpc-password”: “”,
“rpc-whitelist-enabled”: true,
“rpc-whitelist”: “127.0.0.1,192.168.*.*”,
The configuration above does not require a username and password but clients may only connect from a local network. To be able to connect and control your torrents from an internet connection, add a * to the whitelist, a username and password and you must port forward port 9091 on your router to forward to the IP of you DNS-323. If you add a password it will be encrypted in the settings file the next time Transmission is opened.

Configuring Transmission to automatically download Torrents from a watch directory

Transmission has a built in feature (finally, it required a script before) to automatically add .torrent files to the Download queue when they are saved to a specific ‘watched directory’. This will allow you to download a .torrent file from your desktop web browser, save it to the watched folder and forget about it! Transmission will add the Torrent and start the download. These are the settings you need:

“watch-dir”: “/mnt/HD_b2/TorrentWatch”,
“watch-dir-enabled”: true

Make sure you create the directory and that it is readable by the user you run Transmission as.

After you have added these settings to settings.json, save the file and start Transmission.

transmission-daemon –g /mnt/HD_a2/Volume_1/.transmission-daemon

You can now save .torrent files directly to the TorrentWatch folder and Transmission will soon after start downloading them. For convenience, you may find setting up a Firefox plugin like FavLoc useful which allows you to select the download location without having to browse through multiple directories.  Find it at https://addons.mozilla.org/en-US/firefox/addon/2140. I set this up for my wife and it works great.

Perform mass extraction of downloaded RAR archives (Experimental)

Just recently I spent a few hours and started to work on a script to automatically extract all my torrent downloads. Extraction on the DNS-323 is painfully slow due to its slow processor speed. Extracting many large files (TV shows, movies) manually is a long and boring process. I have made it one step simpler (and will continue to improve the process as time permits).

You may find the project page and monitor updates at http://bitbucket.org/markstahler/auto-extract-python/. The latest version of the script can always be found http://bitbucket.org/markstahler/auto-extract-python/src/tip/auto-extract.py.

Currently, the script takes one argument, a directory which contains archives you wish to extract. The script will recursively search for any .rar archives and extract them one at a time until they are all extracted. Each directory that contains an archive (only one archive per directory is supported) is marked with a hidden file named .unrared. This file will cause the script to ignore the archive within if that specific folder is scanned again. This means that you can safely run this script, pointing it to your main download directory whenever your downloads are fully complete. It will extract your downloads and you are able to move the extracted contents (.avi, .mkv or whatever) wherever you wish and the script will not re-extract them. This allows you to see the original downloaded files as long as you wish.

Sample usage:

python auto-extract.py /mnt/HD_a2/Volume_1/downloads

This will recurse my downloads directory unextracting every archive found. Default behavior is to overwrite files if a .unrared file is not present. You can safely run this on your downloads directory but be warned, it may take a very long time depending on what type of files you have. The script took several hours to complete on my DNS-323 extracting many seasons of TV shows in Xvid format.

  • samsom

    Hi,
    I dont seem to have a configuration file in Volume_1. What am I doing wrong?
    samsom

  • samsom

    Sorted it out. i was using apt-get install to install transmission. When I used the source files, it sorted itself out.

  • aslam

    follwoing your guide getting stuck with installing libcurl as this is needed for tranmission. funpkg command is not recognised! followed instructions to the letter dont know what wrong. Process failed and configuring tranmission saying it needs libcurl.

    Tried to install libcurl though funpkg but the command is not recognised. What am i doing wrong?

  • http://blog.markstahler.ca/ Mark

    Hi aslam (sorry just noticed the comment now). The guide was written for people that have debian installed on their dns323 instead of fonz's funplug system.

  • http://twitter.com/ciejef Jeffrey

    I cannot get the watch directory to work — did you install a separate program? Or does the directory require certain permissions? Mine is set as nobody:501 for permissions

  • http://blog.markstahler.ca/ Mark

    Hi Jeffrey: I remember having some issue with this too. Not sure if it was fixed in a newer version of Transmission or what but these are the last two lines in my settings.json file: “watch-dir”: “/mnt/HD_b2/TorrentWatch”, “watch-dir-enabled”: true

    As for permissions, I think Transmission just has to be able to read from your watch directory.

  • http://www.simounet.net Simounet

    Hi there !
    Thank you so much for this post, so helpful ! But I don’t see how did you install the transmission v 2.04 because we need libevent 1.4.9 or higher and I can’t install it on my dns 323… I tried to compile it but it didn’t work.

  • anon

    I worked around the libevent by:
    wget http://backports.mithril-linux.org/pool/main/libe/libevent/libevent-1.4-2_1.4.13-stable-1~bpo50+1_arm.deb
    dpkg -i libevent-1.4-2_1.4.13-stable-1~bpo50+1_arm.deb

  • Zubov

    I am having an Error when running the command : “./configure –enable-daemon ”
    Errorr Message = “checking for OPENSSL… checking for OpenSSL… configure: error: Cannot locate ssl”

    I saw some posts about it, but nothing helpful ….
    any ideas ?

    I have done all previous steps, installing Debian, updating to Lenny, installed all requied packages….
    I tried to instal OpenSSL, but i already have it
    it is here : /usr/lib
    I have tried to run “PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib”
    but problem persist
    any ideas ?

  • Zubov

    Error solved by doing this :
    apt-get install libcurl4-openssl-dev
    apt-get install doc-base
    apt-get install libcurl3-dbg
    apt-get install krb5-doc

    Then i had another error : “configure: error: libevent 1.4.9 or higher not found!”

  • Zubov

    So for the error : “configure: error: libevent 1.4.9 or higher not found!”
    I did this :
    apt-get install libevent-dev
    And located where were my libevent, and re-run the ./configure with extra arg :

    ./configure -enable-daemon LIBEVENT_CFLAGS=-I/usr/local/include LIBEVENT_LIBS=”-L/usr/lib -levent”

    Then i had another Error :
    configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
    Solved With:
    apt-get install intltool
    I ReRun ./configure -enable-daemon LIBEVENT_CFLAGS=-I/usr/local/include LIBEVENT_LIBS=”-L/usr/lib -levent”

    and it worked

  • Zubov

    Ok , now when running the “make” command,
    im getting lots of these errors :
    “error: expected declaration specifiers or ‘…’ before ‘size_t’

    Stuck there …. any Ideas ?

  • Zubov

    OK, nevermind about all those posts,
    All my problems were caused by libevent.

    Got it solved by digging around anon’s Solution

    Sorry for wasting post space !

  • http://pulse.yahoo.com/_3EDQIACJUUHL52RL7V34Q22VOQ RajaR

    I cannot seem to make this work with the current Transmission version 2.12.

    During make I get several errors in file announcer.o

    Any help would be awesome. Thanks.

  • Nik

    Hi there, first of all great tutorial you got here.

    now, im having problems setting up the auto-extract.py scrip with crond/crontab. my crontab job looks like this:

    0,10,20,30,40,50 * * * * python auto-extract.py /mnt/HD/HD_b2/Movies/

    (I know every 10 min is quite often but this was just for troubleshooting purposes)

    if i just paste in and execute the “python auto-extract.py /mnt/HD/HD_b2/Movies/” cmd it runs great, finds the auto-extract.py file and extracts everything in the “movies” with no hustle. but then when i add it to a crontab schedule i get this error msg:

    “: USER root pid 31486 cmd python /mnt/HD/HD_a2/auto-extract.py /mnt/HD/HD_b2/P2P/complete/^M
    Traceback (most recent call last):
    File “/mnt/HD/HD_a2/auto-extract.py”, line 177, in
    obj = Unrar()
    File “/mnt/HD/HD_a2/auto-extract.py”, line 58, in __init__
    self.traverse_directories()
    File “/mnt/HD/HD_a2/auto-extract.py”, line 126, in traverse_directories
    for dirname, dirnames, filenames in os.walk(self.download_dir):
    AttributeError: ‘Unrar’ object has no attribute ‘download_dir’”

    now im quite new to UNIX/Linux systems so i have no clue where the problem is.

  • Nik

    TYPO!!!
    where it sas “”: USER root pid 31486 cmd python /mnt/HD/HD_a2/auto-extract.py /mnt/HD/HD_b2/P2P/complete/”

    it should say
    “python auto-extract.py /mnt/HD/HD_b2/P2P/complete/” instead.. copy pasted the wrong line ^^

  • Anonymous

    OMG another typ!! i really need to read my posts before i post em. sorry, my bad

    is SHOULD say
    “python auto-extract.py /mnt/HD/HD_b2/Movies/”

  • erow

     Hey Zubov, I’m getting the same errors you were. What did you do to fix libevent? When I use yum to install it, it says the latest version is already installed. The same errors persist…. Any help would be appreciated.

  • Pingback: first source bank - Learn all about first source bank

  • Maconvert1970

    I’m having the same errors and Anon’s solution (1 year ago) didn’t help. Any ideas?

  • Sam

    Hi there, thank you so much for this post!

    I ran into a slight problem with trying to configure daemon:

    dlink-983647:~/transmission-2.04# ./configure .enable-daemonconfigure: WARNING: you should use –build, –host, –targetchecking for a BSD-compatible install… /usr/bin/install -cchecking whether build environment is sane… yeschecking for a thread-safe mkdir -p… /bin/mkdir -pchecking for gawk… nochecking for mawk… mawkchecking whether make sets $(MAKE)… yeschecking how to create a ustar tar archive… gnutarchecking build system type… Invalid configuration `.enable-daemon’: machine `.enable’ not recognizedconfigure: error: /bin/sh ./config.sub .enable-daemon faileddlink-983647:~/transmission-2.04#

    Any assistance anyone can offer would be greatly appreciated!

    Sam

  • Sam

    For anyone else having this problem, use : ./configure –build=x86_64

    Thanks again!

  • http://www.eastsidetrans.com/contact/testimonials/ transmission mac Rochester NY

    Quite nice post………

  • http://www.eastsidetrans.com/contact/testimonials/ transmission mac Rochester NY

    Nice post, Can you give me some more details about transmission mac Rochester NY.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2014 Mark Stahler – Blog | powered by WordPress with Barecity