Command-line program for getting and setting the contents of the X selection
http://www.vergenet.net/~conrad/software/xsel