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
@dcode / @b2ag I have a vaguely working solution, but it has two glaring catches, which combine to make it far easier to just say 'always use
waypipe ssh'. (And possibly alias ssh in your shell to make that more practical.)The first issue with my solution is that the remote server must allow the WAYLAND_DESKTOP environment variable to be set by the client. This is, frankly, the biggest issue, as it means adding it to /etc/sshd_config AcceptEnv.
The second issue is that there's no way to dynamically set WAYLAND_DESKTOP in your
~/.ssh/config, this one is more minor, but it's a little annoying.You do get free use of multiplexed SSH connections though.
With all of those warnings given, it looks like this:
With the following as
waypipe_preflightsomewhere in your PATH: