Skip to content

DOCS: This is how to setup clipboard for remote session #60

@Arniiiii

Description

@Arniiiii
  1. Docs are outdated.
  2. Twice
  3. yank.sh is broken in once place: You have to add -q 0 to the nc command at ~/.config/yank.sh of remote machine:
elif [ -n "${copy_backend_remote_tunnel_port-}" ] \
    && (netstat -f inet -nl 2>/dev/null || netstat -4 -nl 2>/dev/null) \
      | grep -q "[.:]$copy_backend_remote_tunnel_port"; then
  copy_backend="nc -q 0 localhost $copy_backend_remote_tunnel_port"
fi
  1. On your main machine, open two separate terminals. In one:
    ssh -R 11988:localhost:3333 remote_username@PUT_HERE_REMOTE_IP_ADDRESS
    In second terminal:
    if you are using fish:
while true
     nc -l -vv -p 3333 | wl-copy
end

if bash:

while true
do
      nc -l -vv -p 3333 | wl-copy
done

You can change the wl-copy part to your favourite clipboard copy-paster command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions