My ubuntu VM does not run cron jobs with a TTY (not even when I log in and run the command from the user's env).Because of this, cron can't run tmux or screen, preventing programs (specifically rtorrent in this case) to be run in the background in a simple and attachable way.What is the best approach to running a program like rtorrent on boot while making it easy to attach, detach, and kill the process from any terminal?I assume just running the equivalent of rtorrent & should do it, but this is not as convenient as screen/tmux.
What is the best way to attach to a cron program without TTY
cron;tmux;gnu screen;tty
If you use the -d option with tmux new, it won't attach to or require a tty.  From man tmux:new-session [-AdDEP] [-c start-directory] [-F format] [-n window-name]            [-s session-name] [-t group-name] [-x width] [-y height]            [shell-command]            (alias: new)Create a new session with name session-name.The new session is attached to the current terminal unless -d is  given. [...]For example:tmux new -d -s rtorrent rtorrentThat creates a new tmux session called rtorrent and runs rtorrent inside it.You will probably need to configure ~/.tmux.conf, and run a script to start rtorrent (rather just the bare rtorrent command) in order to setup the run environment correctly.The user who owns the cron job can attach to the session at any time with:tmux attach -t rtorrentThe equivalent for Screen isscreen -d -m -S rtorrent rtorrentfrom the cron job and screen -S rtorrent -rd to attach later.