I'm trying to adopt Alexey Samoshkin's approach to copy text from remote tmux session into local clipboard. I'm using xsel
instead of xclip
, and systemd user service instead of system one. Here is my working configuration:
/etc/systemd/user/xsel.socket:
[Unit]
Description=xsel network listener socket
[Socket]
ListenStream=54793
Accept=yes
[Install]
WantedBy=sockets.target
/etc/systemd/user/xsel@.service:
[Unit]
Description=xsel network listener service
[Service]
Type=simple
ExecStart=/usr/bin/xsel --input --clipboard --nodetach
StandardInput=socket
StandardOutput=socket
xsel version 1.2.0
systemd 245 (245.6-8-arch)
Everything works as expected, but only with --nodetach
option. Without this option clipboard doesn't change at all. Would you explain why?