Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using GNU Screen on Terminal. Is there a way to use what I copied in GNU Screen into OS X's clipboard? I'm running

  • Mac OS X 10.6.2
  • Screen version 4.00.03 (FAU) 23-Oct-06

Edit: I was thinking about how to pass the content that is copied in copy mode in Screen to pbcopy.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can use the writebuf screen command to write the buffer out to a file, then use e.g. pbcopy < /tmp/bufferfile.

share|improve this answer

I'm edit copy mode bindings to to copy paste buffer contents into OS X clipboard automatically.

# copy the screen pastbuffer to the MacOSX pastebord
bufferfile screen/screen-exchange
bindkey -m ' ' eval 'stuff \040' 'writebuf' 'exec sh -c "/usr/bin/pbcopy < screen/screen-exchange"'
bindkey -m Y   eval 'stuff Y'    'writebuf' 'exec sh -c "/usr/bin/pbcopy < screen/screen-exchange"'
bindkey -m W   eval 'stuff W'    'writebuf' 'exec sh -c "/usr/bin/pbcopy < screen/screen-exchange"'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.