3

Just read the man page, but found no option for this. Maybe I missed it, maybe it doesn't exist. I have a server at home I'm SSHing to for rtorrent, but the torrent stops downloading and won't restart on rtorrent restart, so is there a way I can daemonize so I don't have to sit there and watch it? (if this is relevant, rtorrent is running on a fresh FreeBSD 9.1 install)

3

rtorrent does not have the ability to daemonise itself. But you can use an additional tool for that. For example dtach, screen or tmux. Here is an example of how to create an rtorrent session in tmux.

tmux new-session -s rtorrent -d rtorrent

This creates a session named “rtorrent”, starts the torrent client and detaches. You can now log out and rtorrent keeps running. Next time you log in, you can reattach to the session and bring rtorrent to the foreground using

tmux attach-session -t rtorrent
2
  • ok, it takes the command, but doesn't let me see any trace of the rtorrent menu, which I need to start anything. How do I fix this? – Peace Blaster Jul 22 '13 at 0:46
  • oh sorry nevermind – Peace Blaster Jul 22 '13 at 0:47
7

You can run rtorrent in a screen or tmux session so that it will continue running even after you've disconnected.

The apps screen and tmux are terminal multiplexers which allow you to leave long running terminal tasks alone so that they can run uninterrupted.

Example

You can use screen for example, like so:

$ screen -S rtor_sess

This will give you a screen session named rtor_sess. From within it you can now run your rtorrent tasks, when you're done starting them up or checking in on them you can disconnect from the screen session with the key combination Control+A+D. Remember: (Attention + Disconnect).

After some time has passed and you want to peek in on your rtorrent task, you can SSH back into the system where you're screen session was started and do the following commands to see your sessions:

$ screen -ls
There are screens on:
    1506.bp (Detached)
    2335.rtorr_sess (Detached)
    32090.dl    (Detached)
3 Sockets in /var/run/screen/S-root.

Here you can see that I have 3 sessions. So let's reconnect to our rtorr_sess session:

$ screen -r rtorr_sess

Again to disconnect use the same key combination we used before to disconnect. When you're done you simply exit out of the session to destroy it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.