I'm working over ssh on a linux machine (RHEL 6.8) from MacOS (Yosemite) through iTerm2 (3.0.20161031-nightly). On the remote server, I work in screens (Screen version 4.00.03).
Edit: everything below holds true for highlighting text and trying CMD+C, CMD+V for copy/paste
The remote server was rebooted for standard security update reasons the other day. Ever since, copy-paste in the remote screens is all messed up and I have no idea what's going wrong.
If I open up a fresh iTerm2 session on my laptop, I can highlight copy and middle-click paste text with my mouse as usual.
If I ssh into the remote machine and try to copy/paste something from the initial command line prompt, everything works.
If I reconnect to my screen and start a new sub-screen and try to copy/paste something, everything works.
If I log into a similar remote server with a similar setup, go into emacs -nw in a screen on that machine and try to copy/paste, everything works.
However, when I log into this server and connected to a screen running, say ipython or emacs (in terminal mode), which is how I always work, the mouse highlight / middle click paste scheme goes haywire. Until this week, it worked normally.
From within my reconnected screen (I use sub-screens that I flip back and forth between):
In emacs highlighting and middle-clicking does nothing (at the moment, though I think before it was behaving the same as below. Edit: it does. The behavior is the same in ipython and emacs, and are apparently tied together).
In e.g. ipython, if I highlight some text and then middle-click, what's pasted is actually the text from some number of lines (the exact number changes) below what's highlighted, e.g.:
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.
if I highlight "Introduction and overview" and middle-click on the python command line, what's pasted is "Details about 'object', u"
This all worked normally until this week; I might have tweaked some settings in e.g. emacs awhile back to make everything work with the mouse. As far as I know, nothing on my machine has changed. But my understanding of the copy-paste dynamic here is that it would be all my system and not the remote server. But I only see the problem within screens on this remote server.
Any ideas on what might be going wrong here?