Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 2.12 KB

README.md

File metadata and controls

55 lines (41 loc) · 2.12 KB

clip share command

for clipboard sharing between local and remote environment

how to use

  1. install at local environment
  2. clip-share.sh <host name at ssh config>
  • local host: windows(MSYS,WSL), Mac OS X, Ubuntu
  • remote host: Mac OS X, Ubuntu

Threre is no need to install any tools without Mac OS X environment. (Mac OS X require nkf tool, )

environment variable

  • CLIPSHARE_SSH_RETRY_INTERVAL: default value is 3[sec]
  • CLIPSHARE_DROP_WINDOWS_CR: default value is 1(enable)

Sequence Diagram

sequenceDiagram
    participant local
    participant remote

    loop monitoring clipboard with ssh
        opt if local local clipboard has changed
            local->>remote: send clipboard via ssh tunnel
            Note right of remote: base64 format
            remote ->> remote: update clipboard
        end
        opt if remote clipboard has changed
            remote ->> local: send clipboard via ssh tunnel
            Note left of local: base64 format
            local ->> local: update clipboard
        end

        Note left of local: break by ctrl-c
    end
Loading

FYI

wait loop (local) <-- ssh pipe --> pipe wait loop (remote) | clipboard wait loop (remote) <-- ssh pipe --> pipe loop (local)

ubuntu clipboard bug

FMI

assuming both your ssh client passes the LC_* variable (SendEnv in ssh_config) and the sshd server accepts them (AcceptEnv in sshd_config))