Pages

Sunday, November 16, 2008

Back to CLIs: it's really funny running btdownload* on Solaris 10 (with a screen multiplexer)

After having used I don't even know how many bittorrent GUI clients (such as Azureus, KTorrent, etc.), I recently fell back to bittorrent CLIs. Why? Because I've got a server with a pretty good DSL connection (more than 10 time faster than what I've got at my home...) and I usually ssh-to it. Problems where two: remotely opening a GUI (my home connection is not so slow, but clearly insufficient for remote graphical sessions) and not having killed the process when disconnecting. Both problems are easily solved, many bittorrent clients I've seen so far support some kind of daemon mode. But using a screen multiplexer was simpler.

I already told you about GNU Screen multiplexer
, and this is the typical use case GNU Screen fits perfectly in.

Installing bittorrent (the original)
As usual, from Blastwave. Here's the package and here's the command line to install it:
# /opt/csw/bin/pkg-get -U
# /opt/csw/bin/pkg-get -i bittorrent
and follow on as usual.

Running bittorrent in a multiplexed terminal
Now that we have your copy of the bittorrent client installed it, it's time to use it. The reason why I want to use a terminal multiplexer is because I'll be running bittorrent on another machine. I could nohup the process, but once done that and disconnected, I couldn't reattach to it and see output in the console, the only thing I could do would be reading the files where standard output was redirected (by nohup). It's not a good way to go, with such program as bittorrent.

First, launch bittorrent in a screen session: I prefer this way, as stated in another blog post:
$ /opt/csw/bin/screen -m -d /opt/csw/bin/btdownloadcurses [your-torrent-file]
If you feel like checking what's going on before leaving it there to download, you could check bittorrent status reattaching to it
$ screen -r PID
and then using CTRL+A,D to detach another time.

You can now safely log out from the machine and leave bittorrent working. From time to time, you can log in and reattach the screen to check for progress and just hit q to exit bittorrent when it's done.

Enjoy!

No comments:

Post a Comment