Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many times I have accedentally pasted into my Xterm window, with the result that whatever text is pasted in is executed by my shell (zsh). I would like to know if I can disable pasting into Xterm.

Edit: it is my middle mouse button that is doing the pasting. I would rather avoid pasting into the Xterm with my mouse, since Ctrl - Shift - V is both faster and less error-prone.

share|improve this question
I suppose you still want to paste in other locations? Have you considered simply re-mapping, or un-mapping the paste button? – Zoredache Feb 25 '14 at 23:08
@Zoredache How would one do this? The paste button is the middle mouse button. – Demetri Mar 7 '14 at 17:06

The solution was the safe-paste plugin for oh-my-zsh. This prevents anything pasted from being executed until I hit enter, so I can Ctrl-C and discard what I pasted.

Edit: This apparently does not work completely, because I could paste text (containing an embedded escape sequence) that would fool zsh. So I am back to the original question: How do I disable entirely pasting into my Xterm with the mouse? (The solution in general is to first look at everything in a text editor, but I want to avoid accidental pasting).

share|improve this answer

Your Answer


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.