Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 am new to Linux. In my company, we have a Linux server, and there are multiple users (thus multiple accounts) on that server. So logically, there would be different clipboards for different users.

My question is: just like in Windows we can have a clipboard viewer, how can I see the contents of clipboard on Unix?

share|improve this question
I am not sure what you are asking for? Are your users using X? If not and they are using ssh they don't have a clipboard. – Ulrich Dangel Jul 28 '12 at 22:25

Your reasoning is sound, but you started from an incorrect premise. Linux does not really have "clipboards", that concept just isn't part of the operating system. Instead, the windowing system, almost always X11, implements clipboards. The X11 server, which manages and runs the display, does clipboards. That way, a clipboard is a property of a user-level program, not the operating system, and moreover, there's one set of clipboards for each display (which is more-or-less each monitor or screen, but not always).

That said, the X11 clipboard is a bit weird.

As far as seeing the contents, I've always been fond of xcb, but that's apparently considered pretty obscure these days. You might like paracellite, but look around, it appears that many X11 clipboard managers and interaction programs exist.

share|improve this answer

A clipboard is nothing special and just a implementation detail for some programs, e.g. X, emacs, vim and other programs have implementations what you could refer to as clipboards.

As you are talking about an Server i assume your users log-in into the system via ssh that means there is no clipboard for these users this is handled by their Hostsystem and terminal.

If you want to access the X clipboard there are multiple solutions, e.g:

  • xclip - a command line interface for the clibpoard
  • clipit - a clipboard manager without dependencies to other desktop environments

If you want to access the X clipboard content for another user you have to access the X session for this user.

There are many other things you can look into, e.g. autocutsel, integration between X clipboard and emacs, etc.

share|improve this answer

In emacs, examine


I wrote this to copy a whole buffer to the clipboard:

(defun copy-all ()
  "copy buffer to clipboard"
  (clipboard-kill-ring-save (point-min) (point-max))
  (message "Copy done.") )

Also, I've made a useful alias called xc, like this: xclip -selection clipboard. Then, echo $(pwd) | xc (for example) will send your directory tree position to the clipboard.

And, by accident, I noticed I can paste into urxvt by pushing the mousewheel button. I don't like using the mouse at all, so if you know how to bind this to a keyboard shortcut, please tell me.

Edit: I found (somewhere on this site) that the answer to the final (my) question is - it is already done, namely Shift-Insert.

share|improve this answer
You should post your bind-paste-to-keyboard-shortcut as a question - you'll get better help that way. – Bruce Ediger Jul 29 '12 at 14:04
@BruceEdiger: Right, but everything else in the post including how to paste into a terminal (at least one way to do it) is useful as I understood the question so - you see where I'm getting? - just ignore the last sentence if it bugs you :) – Emanuel Berg Jul 30 '12 at 16:26

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.