Linux: utorrent and desktop integration

by
After a bit of work with python I am back to good old bash scripting. Before I begin the actual post a few words about utorrent. This is the only windows based program that I am still to find a substiture for. I know there are lots of good torrent clients there for linux but each one of them has some feature missing ( rtorrent cant queue torrent individually, transmission does not proide advanced options) or problems ( deluge can delete pieces while rechecking) or are resource hogs (azureus because of the java backend) and so I am still using utorrent. As and when rtorrent will get the queing feature implemented I will shift to it. Till then enjoy using utorrent with full desktop integration.
Here I am providing a bash script to provide desktop integration features for utorrent. These include open torrent with utorrent on dbl click, direct open from firefox etc.

Before using the script make sure that all ur drives are recognized by wine and have paths associated with them. It should look something like this picture after you use auto detect through winecfg.


After ensuring this do the following.

$ sudo gedit /usr/bin/utorrent

Paste following in the file and save it.

#!/bin/bash
LANG=en_US.utf-8
LC_MESSAGES=en_US.utf-8
TORRENT_FILE="$1"

path=`winepath "$TORRENT_FILE"`
final=${path:31}
#where 31 is no. of characters in /home/chinmay/.wine/dosdevices/
#change that number accordingly
wine "C:\Program Files\uTorrent\uTorrent.exe" "$final

Change the owner of the file and make it executable.

$sudo chown username /usr/bin/utorrent
$chmod +x /usr/bin/utorrent

Our script is now ready to be used. For it to work with Firefox change the setting in Edit->Preferences->Applications and select this utorrent script for torrent files. Should look something like this when you are done.


Do the same for general desktop integration ie. open with custom application and select the bash script and we are done.

Enjoy using utorrent till rtorrent adds a few more features. Btw, those interested in rtorrent can check Aditya’s and Vedang’s blogs for a guide. Happy downloading. 🙂

Advertisements

Tags: ,

2 Responses to “Linux: utorrent and desktop integration”

  1. Furquan Says:

    Cant believe it…m the first one to comment…. 🙂
    Once again a superb piece of work….(as usual 😉 )……… Now i can use my torrent downloads very quickly…Thanks to CDK….:)……Keep up the articles coming:)

  2. backtogeek Says:

    I have an easy guide for installing transmission in case anyone stumbles over this: http://backtogeek.com/2010/07/20/installing-transmission-on-centos/ and wants a simple to use torrent client for centos with a nice web gui 🙂

    enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: