Using Transmission Remote as your default bittorrent client

Introduction

Transmission is a torrent client that comes pre-installed with most linux based operating systems like Ubuntu, Elementary OS, Linux Mint etc. However, in this post I am going to talk about transmission-remote, a command line variant of this popular torrent client. I have been using it for past 6 months, and I like it very much. With it I can control the client using terminal commands, using a web browser or “transmission remote” android or a gtk GUI applications. I also use different key bindings to control behaviors like pause the torrents, start them, or use alternate speeds. I also use other torrent clients for smaller download sessions, but transmission-remote is my default torrent client for most of my downloads. I use “transmission-remote-gtk” GUI tool for commands I don’t want to remember e.g creating labels (a label is an alias for specifying a download directory and you can have as many as you like), changing the queue size etc.

Installation

Using your package manager install “transmission-cli” and “transmission-remote-gtk” packages. To start transmission-remote run “transmission-daemon” command from the terminal. If you want transmission remote to be started at startup, this is the command to be executed. After running this command in your terminal, open up a web browser and go to “http://localhost:9091/transmission/web/“. If asked for a password you can specify one, if not no worries.

transmission_web

Next, open “transmission-remote-gtk” application and connect to

Host: 127.0.0.1
Port: 9091
RPC URL Path: /transmission/rpc

remote_preferences

Using “Remote Preferences” window configure things like “Download directory“, “Incomplete download dir” and “Download queue size“. Using “Local Preferences->Directories” tab add some of your favorite directories as “Labels“. I usually use separate directories depending upon the type of download file. After you add a torrent link/file you can right click it and “move” to your favorite label (I would have wanted it to let me choose the label during torrent addition like in qbittorrent). In addition to “Directories” labels, there are also “Actions” labels, which I have found no real use for me.

adding_torrent

To setup a username and password, you can use the command line option like this.

$ transmission-remote -n username:password

Note: Make sure to clear the command history (e.g using “history -c” command), because your password is in clear text.

Remote Access

In your home network, you might only want certain ip addresses to have access to transmission. For that, you have to enable the allowed list. Please read next two lines before running this command.

$ transmission-daemon -a 127.0.0.1,192.168.0.100,192.168.0.101,192.168.0.102,192.168.0.103,192.168.0.104

If above command does not work (I don’t trust this command anyway), you can change following options in ~/.config/transmission-daemon/settings.json file. If above command opens separate process (ps -ax | grep transmission), please kill the process first.

"rpc-whitelist": "127.0.0.1,192.168.0.100,192.168.0.101,192.168.0.102,192.168.0.103,192.168.0.104", 
"rpc-whitelist-enabled": true,

By investigating the settings.json file you can confirm if all commands we used previously got executed properly or not.

Along with allowing ip addresses in transmission, you should also make sure your firewall is not blocking these addresses.

$ sudo ufw status
To Action From
-- ------ ----
9091 ALLOW 192.168.0.0/24

If this is your first time adding a rule in ufw, the small man page is all you need to get started (because it has examples for most use cases). Here is the command for above line.

$ sudo ufw allow from 192.168.0.0/24 to any port 9091

Note: This is a good time to restart your computer if you are not in the mood to figure out how to start/restart individual services.

Exiting Transmission Daemon

$ transmission-remote --exit

You can start it with

$ transmission-daemon

Command line options

I usually, don’t use the command line options, but if you prefer this option, you might want to watch these youtube videos from gotbletu. Here are my alias (using gotbletu’s commands). You can copy these to .bashrc or .bash_profile file (depending upon your environment).

# transmission daemon 
tsm() { transmission-remote -l; }
tsm-pause() { transmission-remote -t "$1" --stop; }
tsm-start() { transmission-remote -t "$1" -s; }
tsm-enablealtspeed() { transmission-remote --alt-speed; }
tsm-disablealtspeed() { transmission-remote --no-alt-speed; }
tsm-purge () { transmission-remote -t "$1" --remove-and-delete; }
tsm-remove () { transmission-remote -t "$1" -r; }
tsm-info () { transmission-remote -t "$1" -i; }
tsm-speed () { transmission -t"$1" -i | grep speed; }
tsm-add () { transmission-remote -a "$1"; }
tsm-pauseall () { transmission-remote -tall -S; }
tsm-startall () { transmission-remote -tall -s; }
tsm-search () { echo "================================="; transmission-remote -l | grep -i $1; }

After adding these lines, you can execute commands like “tsm“, “tsm-search” etc in your terminal to list all your torrents, pause, start specific torrents, search, remove, enable alternative speeds etc.

Keyboard Shortcuts

As mentioned earlier, you can start transmission daemon at startup. However, I like to enable it manually. Therefore, I have added keyboard shortcuts especially for few of these options. Here are my settings.

bindsym $mod+Control+t exec chromium 'http://localhost:9091/transmission/web/'
bindsym $mod+Control+0 exec transmission-daemon
bindsym $mod+Control+1 exec "transmission-remote -tall -s"
bindsym $mod+Control+2 exec "transmission-remote -tall -S"
bindsym $mod+Control+3 exec "transmission-remote --alt-speed"
bindsym $mod+Control+4 exec "transmission-remote --no-alt-speed"
bindsym $mod+Control+9 exec "transmission-remote --exit"

This is my setting for i3. Using this setting, you can bind the commands (text after “exec” in above lines) to your favorite keyboard shortcuts in your favorite desktop environment or window manager.

Android Transmission Client

If you have made this far, this should be the easiest part. All you have to do is, download the android client, specify the remote address (in this case ip address and port address i.e 9091 of this computer). Since, ip addresses change if you are using a router, I suggest you bind this computer’s mac address to a particular ip address, so that you don’t have to bother changing ip in your android app.

Conclusion

There are many good torrent clients, that give good remote and local options. Besides transmission-remote, I also use qbittorrent. I particularly like its sequential download option. You should definitely check qbittorrent too. In this tutorial, I hope I have given you enough contents to get started with transmission remote.

References

  1. https://www.youtube.com/user/gotbletu/search?query=transmission
  2. https://wiki.archlinux.org/index.php/Transmission
  3. https://trac.transmissionbt.com/ticket/1583
About these ads

5 Comments

Filed under Uncategorized

5 responses to “Using Transmission Remote as your default bittorrent client

  1. The ASUS RT-AC68U router is so hackable. I was able to delete the default torrent client and install the Transmision daemon. I use the Transmission Remote as my default client and it is great! I have different samba shares for movies and TV episodes so I wrote a bash script that will copy movies to a samba share if HDTV is not in the file or directory name for movies and if HDTV is in the name to a share for TV. Because everything runs on my router it is up 24/7, It is a great set up!

  2. thanks for the tsm-search grep idea; gonna have to add that to my alias =)

  3. “If asked for a password you can specify one, if not no worries.”
    Helpful??? I don’t think so the guide is complete. I never get in.

Leave a Reply

Please log in using one of these methods to post your comment:

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