problem at hand: how do i use the mouse to copy/paste text in xterm running tmux on PC?
normally you should not have problems selecting text and pasting it with your mouse. everybody knows about left clicking and then dragging to select and copy the text. in order to paste you need to middle click your mouse. however there are certain options which if set will prevent this functionality.
if you have set the following options
you will notice that you are not able to select text at all.
the solution is to use the shift key.
hold down the shift key and then left click and drag across the target text. if you want to now paste the selected text back in to xterm, you must also hold down the shift key and then middle click in order to paste the text.
this is not mentioned in the tmux man pages so i do not think this is a tmux feature. guess this has something to do with xterm, but i m not sure.
xterm version 278-1
tmux version 1.6-2
guly in the comments informs me that iterm users on macosx need to use the option key.
bruceedge pointed out that if the target text area resides in a pane of a split window then trying to copy with this method will also copy stuff from adjacent panes.
to counter this problem one hack is to use the zoom pane functionality. say you want select text from a pane that resides in a split window with other panes. with keyboard focus on the target pane, you simply hit prefix + z to maximize this pane to the entire window. copy what ever it is you want to copy and then hit prefix + z again to toggle back to the previous state.