9

My objective is to make a text on my remote machine (CentOS 7.2) available to seamlessly paste on my local machine (OS X 10.12.2) with the standard ⌘V shortcut. My setup connects to the remote machine with ssh -Y and then attaches to tmux (or creates a new session if non-existent). When I run either echo "test" | xsel -ib or echo "test" | xclip it hangs. The $DISPLAY variable is localhost:10.0. If I exit tmux the $DISPLAY variable seems to be null and I get a can't open display error.

Kvass
  • 221
  • 1
  • 5

2 Answers2

0

MacOS does not use XOrg Server, but Quartz graphics stack, or some other crap (it is some years I worked with macs daily).

You either want to run XOrg on Mac OS (this used to be possible), or learn how to use mac native pbcopy(1) and pbpaste(1) commands.

etosan
  • 884
  • 4
  • 7
0

I wrote a tool to handle this type problem using a Gitlab snippet some while a go. It might work for your use case.

See https://github.com/bradwood/glsnip

Brad
  • 241
  • 1
  • 7