From ArchWiki
Latest comment: 13 July 2020 by Sanjeev K Sharma in topic attaching to daemon mode to see updates without scgi?


It seems to me "set network.http.ssl_verify_peer.set=0 " would open the door for man-in-the-middle attacksRwd.

rtorrent with dtach as service?

There are 3 service files so far, with tmux and screen. But can it be done with dtach? /usr/bin/dtach -n /home/dustball/.dtach/rtorrent /usr/bin/rtorrent doesn't seem to cut it. Dustball

(moved my solution to the page proper)Sanjeev K Sharma (talk) 13:32, 11 July 2015 (UTC)Reply[reply]

I could not figure oun a way to go even more minimalist - start rtorrent "bare", just with systemd's sockets like so:

ExecStart=-/home/sam/bin/rtr_new -n -o import=/home/sam/.config/rtorrent/new_.rc

and if I need the interactivity, take over the sockets later like this:

reptyr -T `pgrep -fn rtr_new_ `

(it's in one of the Arch repositories)

Reptyr's man page says it does not work with rtorrent but I find reptyr can successfully steal from dtach once. After that a 2nd reptyr won't steal rtorrent from the 1st reptyr. Sometimes it seems to work for a few seconds then rtorrent just goes away.

also I can do this repeatedly (separate terminals) - neercs steals from reptyr, reptyr from neercs and repeat as many times as you like;

neercs -P `pgrep -fn rtr_new_` &

reptyr  `pgrep -fn rtr_new_ `

and rtorrent keeps running fine

so the problem's not with reptyr per se

why don't we just assume for simplicity that there is only one session?

My intent was to answer more questions in minimal space by extending the examples to more use cases (--user, multiple instances per user). Sanjeev K Sharma (talk) 13:26, 11 July 2015 (UTC)Reply[reply]

Creating multiple rtorrent sessions this way is far from perfect

perhaps a separate section is needed?

last time I lurked on rtorrent discussions this question came up regularly.

I'd like to have another way to do multiple sessions, preferably integrated with systemd Sanjeev K Sharma (talk) 14:07, 11 July 2015 (UTC)Reply[reply]

Improve Systemd services using tmux section

It's not possible to start any command with tmux if the user is a daemon / service account (that has /usrb/bin/nologin or /sbin/nologin as a shell that can be changed for extra security for SFTP user for example), even if /sbin/nologin is added to /etc/shells.

The only post talking of that on internet I found is this reddit thread

Also for With tmux running as user rtorrent (restart rtorrent if crashed) should we add ReamainAfterExit=yes because tmux is detached? And also should we change sendkeys -t rtorrent into sendkeys -t rtorrent:rtorrent in order to target the right window if there is several windows inside the session?

Noraj (talk) 18:18, 4 February 2018 (UTC)Reply[reply]

Improve dtach systemd unit

For starters, I had to change "" to "default-target" or it wouldn't work on boot after having enabled it. After that it kept failing to start because rtorrent couldn't lock the session file. I'm currently running this:


ExecStartPre=-/bin/rm /home/raphael/.config/rtorrent/.session/rtorrent.lock /home/raphael/.config/rtorrent/dtach
ExecStart=-/usr/bin/dtach -n /home/raphael/.config/rtorrent/dtach /usr/bin/rtorrent
ExecStop=-/usr/bin/killall -w -s INT /usr/bin/rtorrent


The user will probably be surprised to see the arrow keys not working... according to the gentoo wiki the fix is to enter "keyboard transmit mode", attach and then leave keyboard transmit mode. Basically this page should suggest the user to create an alias with this

tput smkx; dtach -a ~/.config/rtorrent/dtach; tput rmkx 

I wonder how I go around packaging this... unfortunately I'm not very well versed in systemd and I'd much rather be using OpenRC if Arch Linux hadn't been infected with this disease.

RaphaelCosta (talk) 14:35, 16 June 2018 (UTC)Reply[reply]

systemd unit file

What do you think of this unit file

Description=rTorrent Daemon

ExecStart=/usr/bin/rtorrent -o system.daemon.set=true


I had the idea thanks to this warning:

This article or section is out of date.

Reason: rTorrent 0.9.7+ includes a daemon mode. See this issue for more details on how to use it, especially this comment for the configuration syntax. (Discuss in Talk:RTorrent)

--Noraj (talk) 00:14, 27 January 2019 (UTC)Reply[reply]

I have added a fleshed out version of this to allow multiple users using a single service unit.
There is probably a better way of achieving this than what I have added though. I couldn't get %h working when user/group is specified via %I, so all values for a user are using %I, as shown by the ExecPre line.
Abzie (talk) 10:23, 21 May 2019 (UTC)Reply[reply]

attaching to daemon mode to see updates without scgi?

If one does not want to enable scgi, how can one use daemon mode to check the status? (my weakness at getting the search terms right may be showing here)

That seems to me the central benefit of dtach - attach, view what's happening & reattach.

I would prefer to get rid of the extra complications of dtach but I've not found attach/detach/reattach funcionality with daemon mode without scgi. Sanjeev K Sharma (talk) 14:29, 13 July 2020 (UTC)Reply[reply]