i’m using transmission for my regular bittorrent needs. it has a nice simple interface and can even be run as a daemon on a server. therefor it even offers a nice looking web interface.
Note: if you are running gentoo or a system that uses the xdg-utils with xdg-open, you might want to look at this howto.
since my working machine is not always running but my server is, this is where transmission is set up.
the web interface provides a nice mask to setup your torrents. you can upload a .torrent file (to your remote machine) or just an URL of a torrent or most recently a magnet link. this is very handy since you don’t need to handle any .torrent files locally. just copy that link and you are done.
when you are running a torrent client directly on the machine you pick out your torrents clicking on the magnet link will most likely start the download immediately without having to copy that link. this kind of comfort was missing with the remote version of transmission.
so i hacked around to solve that.
setup your remote transmission daemon.
then you need a little script that calls the ajax function the web interface provides to ‘upload’ the magnet link.
this is what i came up with:
#!/bin/bash
test -z $1 && echo "need magnet link!
$0 <magnet link>" && exit -1
HOST=YourRemoteHostNameOrIP
PORT=YourPort(default is 9091)
USER=User
PASS=pass
LINK="$1"
# set true if you want every torrent to be paused initially
#PAUSED="true"
PAUSED="false"
SESSID=$(curl --silent --anyauth --user $USER:$PASS "http://$HOST:$PORT/transmission/rpc" | sed 's/.*<code>//g;s/<\/code>.*//g')
curl --silent --anyauth --user $USER:$PASS --header "$SESSID" "http://$HOST:$PORT/transmission/rpc" -d "{\"method\":\"torrent-add\",\"arguments\":{\"paused\":${PAUSED},\"filename\":\"${LINK}\"}}"
the last thing you need to do is tell your system what to run when you click on a magnet link.
adapting this forum tip you need to run:
gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "/path/to/your/script/from/above/magnetLinkTransfer.sh %s" gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true
that’s it. now click on any magnet link and transmission will intercept it and will start it automatically on your remote transmission-daemon.
i used transmission-daemon version 2.31 (12441) for this. it should work on newer versions as well. have fun.
















