Skip to content

Instantly share code, notes, and snippets.

@improve100
Last active August 8, 2018 06:33
Show Gist options
  • Save improve100/fc1076d1bf6419b91c326d38497013aa to your computer and use it in GitHub Desktop.
Save improve100/fc1076d1bf6419b91c326d38497013aa to your computer and use it in GitHub Desktop.
tmux 系统剪切版复用 && 远程复用
1.系统复用:
##install
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tmux-yank ~/.tmux/plugins/
sudo apt-get install xclip
##edit .tmux.conf file
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'
run-shell ~/.tmux/plugins/tmux-yank/yank.tmux
set -g @yank_selection 'primary'
2.ssh
git clone https://github.com/wincent/clipper
cd clipper
go build
sudo cp clipper /usr/local/bin
cp contrib/linux/systemd-service/clipper.service ~/.config/systemd/user
##start service
systemctl --user daemon-reload
systemctl --user enable clipper.service
systemctl --user start clipper.service
##use
ssh -R localhost:8377:localhost:8377 root@remoteAddress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment