uTorrent and Ubuntu
December 22nd, 2008 Chris
Tags: howto, linux, tech, ubuntu | 2 Comments »
RSS feeds plus bittorrent makes auto-downloading video content from the web easy, and keeps our library full of shows to watch through the Xbox. I struggled for a while to find a bittorrent client that was simple and had the features I wanted, though.
Azureus is a bloated mess, Transmission is far too simple, Deluge made feeds a pain in the ass . . . you get the idea. Finally, I found that uTorrent had all the features I wanted in a lightweight, easy to use client. The only problem is, it doesn’t run natively on linux. Thankfully, it runs almost perfectly through Wine, with a taskbar icon and everything.
The only problem I had was that when I clicked on a torrent in my browser, I couldn’t get it to auto-launch in uTorrent. The extra layers added by wine complicated things. I finally solved the problem by writing this little bash script:
#!/bin/bash
cd ~/.wine/drive_c/Program\ Files/uTorrent
echo ""
if [ "$1" != "" ]; then
dt=`date +%s%N`
cp "$1" /tmp/$dt.torrent
var="Z:\\tmp\\"$dt".torrent"
wine utorrent.exe "$var"
else
wine utorrent.exe
fi
It takes the torrent file given as an argument, saves it to an accessible location, then opens it using uTorrent. Save the script, make it executable, and then set firefox so that it uses the script to open any torrent files. Problem solved.

February 16th, 2009 at 11:19 am
Thanks :)
April 27th, 2009 at 9:30 pm
I tried doing this, and even tried getting rid of the \ after Program in the second line. Still doesn’t work. Please help.