The toman diaries

Torrents in Opera, with Suse

I don't know about you, but I love bittorrent. It's just so efficient and so plain simple to use.

I've lately been struggling uphill to understand Linux, and I think I'm getting to grips with it, albeit slowly. Coming from the windows world, I'm in effect handicapped by all the glamour and flashing lights (although they often fusk).

I wanted bittorrent to work in my Suse 9.0 installation, and so I set out to find a client that could do the downloading for me. I went straight for the source, the bittorrent official client is by far the simplest around. I found an rpm for suse 9.0, called bittorrent-3.3-2.noarch.rpm.

What intimidated me at first with this client was that it required command-line arguments for operation. Not that I don't like that, but under windows, I just couldn't get it to work. Guess what, I made it work under Linux. Linux IS easy like they tell you! Its just windows that has terrible command-line tools and syntax, which varies from windows version to windows version. Not so with Linux or Unix, and there's a LOT of documentation out there too. And there's the man pages as well, which give you the jump into understanding what the creators of a program were thinking, and how to operate it..

Installing it

Anywho.... This post was supposed to be about how I got bittorrent working in Opera, and that rather elegant too if I may say so;

Download that rpm I mentioned, and just install it with yast (that is, open it in Konqueror and press the "install with yast" button; you can also use yast package-name.rpm, or the original rpm -i package-name.rpm from the command-line. I used the Konqueror Yast option, it installed some additional packages I needed as well; python, for instance. Not sure if rpm does that...)

Now that it's installed, its time to set up Opera. Since I didn't install the GUI version, I needed to latch out the konsole to work it so I could see it (it is possible to run it directly, but then you'll never see whats happening). You need to set up a file-type entry in Opera, with the mime-type application/x-bittorrent, and file-type torrent. The elegant part is the command-line you put in "Open with other application".

konsole --nomenubar --noscrollbar --notoolbar --noclose --workdir /home/toman/btdls --vt_sz 70x9 -T Bittorrent -e btdownloadheadless.py --max_uploads 9 --max_upload_rate 29 --minport 6900

Now, this might look intimidating, but what it says is this:

Open konsole, with no menubar, no scrollbar, no toolbar, dont close when the program is finished, set the working directory to /home/[user]/btdls (eg save the torrent here), with a size of 70 columns x 9 lines, Call the window Bittorrent; In that konsole, Execute the command-line bittorrent client with max uploads of 9, max upload rate of 29kbps, listening at port 6900 and above.
09 march: I've updated this and set the working directory for the konsole instead of telling the bittorrent client where to save it with --saveas. It didn't work if the torrent was set to be saved in no folder of its own

It looks like this:
Screenshot of the official bittorrent client in the KDE konsole on suse 9.0

I love it when I can control how apps work. :-)

Opera's search function

Opera is just lovely when it comes to modification. One of it's lovelies is that you can add and/or edit the search engines it already comes with. So why not make one for torrents? You can actually use google for that, and its very simple. You probably know google can search for exclusive types of documents, but those that are listed at the advanced search page are not interesting here. You can add file type:torrent to the query, and it will find torrents only!

Now.. You can add a search engine to Opera with the nice Search.ini editor for windows. But on Linux, the manual way is by adding the below to ~/.opera/search.ini, minding the number, it needs to be 'next in line':

[Search Engine 40]
Name=Google Bittorrent
URL=http://www.google.com/search?q=%s+filetype:torrent&sourceid=opera&num=%i&ie=utf-8&oe=utf-8
Query=
Key=bt
Is post=0
Has endseparator=0
Encoding=utf-8
Search Type=0
Verbtext=17063
Position=-1
Nameid=0

This page is powered by Blogger. Why isn't yours?