The goal of this gist is to setup waypipe to automically run locally on user login and remotely when you connect to it. In both cases, this is managed by systemd user session and assumes that is running. This took way too long to figure out, so I hope it helps someone (or me) in the future.
On your local system, copy the waypipe-client.service to the user systemd directory.
install -d 0755 ${HOME}/.config/systemd/user/
install waypipe-client.service ${HOME}/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now waypipe-client.serviceConfigure SSH Remote Forward by creating or amending an entry for your remote host.
It should look like the ssh_config file in this gist.
On the remote system, do similarly with waypipe-server.service.
install -d 0755 ${HOME}/.config/systemd/user/
install waypipe-server.service ${HOME}/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now waypipe-server.service
My solution is now based on @dcode's and @zelch's.
I changed the
waypipe-server.servicetowaypipe-server@.servicewith following content.And use
waypipe-client.servicealmost unchanged.Than I tagged my waypipe hosts in
~/.ssh/configbut did the setup step upfront like follows. Assumingwaypipe-server@.serviceis available on the remote host.EDIT: Just noticed that XDG_RUNTIME_DIR locally and on the remote side could differ. That won't happen for my setups but could happen in general and is NOT handled correctly here. Sorry for that.
Thanks again to both of you! ❤️