I've been using xclip to copy the output of bash commands like so:
pwd | tr -d "\n" | xclip -selection c
So that I can then paste the output into another terminal session.
I was trying to use it on my headless server (ubuntu 13.04), which is started without x. It doesn't work with the error:
Error: Can't open display: (null)
Is there a way around this. I realise that seeing as the program is called xclip it may not be possible.