Now that I can ssh from anywhere to my linux box using my new Treo 650 and pssh, I am really enjoying the authoritative command-line versions of bittorrent straight from Bram Cohen. All I needed was a way to easily ssh in, play with torrents, and disconnect without stopping bittorrent. There are three ways that I know of to leave processes running after disconnecting from a terminal:

  • nohup
    This is specifically designed to run processes detached from terminal.

  • double &
    eg: (./btlaunchmany.py torrent/active/ > torrent.log 2>&1 &) &

  • screen
    This is an entire “screen manager” for processes that use the terminal to display output.

    [screen] really kicks booty – screen and btlaunchmanycurses.py are a perfect match:

  • screen btlaunchmanycurses.py –max_upload_rate 1000 /torrents
  • [ctrl-a d] to disconnect and drop to command line
  • [screen -r] to reopen the backgrounded session
  • Killing the session does NOT kill the bittorrent process – relogin and do [screen -r]
  • After reopening, kill bt as usual to end process

    Try it out, it rocks! More on this here

  • Leave a Reply