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

I'm using Ubuntu and vim. I can copy text from vim and paste it into another window by highlighting it in vim, then middle-clicking in the other window. This works fine when I'm on my local machine.

I can also copy into the system register by highlighting text and yanking to the system register. (For example, Shift-V JJ "+ y to go into linewise visual mode, highlight two lines, select the '+' register and yank.) It's then available to paste into other windows.

However, if I ssh into my web host, I can't do either of these. (They use some flavor of Linux - I think it's CentOS.)

In vim, if I type :version, my local version shows +xterm_clipboard, but the host's version shows -xterm_clipboard. I don't have sudo rights there.

Is there any way to be able to copy from their vim without getting them to tinker with the installation?

share|improve this question

When you use ssh, you generally don't want the other computer to have access to your x session for security reasons. But if you do an ssh -X (again, you should understand the security implications) I think it should allow the remote shell to access the x windows clipboard.

share|improve this answer
SSH is encrypted; wouldn't any clipboard contents transferred also be encrypted? If so, isn't it then just a question of whether I trust the machine on the other end? – Nathan Long Apr 21 '10 at 21:47
@GorillaSandwich, pretty much yes--trusting another machine can be tricky and dangerous. If you do anything sensitive, or if the sysadmin of the destination machine isn't security-aware, then your risk increases. Basically, the remote machine can run anything (including a keylogger) on your x session. – K Robinson May 19 '10 at 16:59

Can you run xcutset on their system ? That should be able to solve your problem. xclipboard is another option.

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.