[ILUG] Getting text into the X cut buffer from an xterm?

Ronan Waide waider at waider.ie
Sun Dec 2 16:48:41 GMT 2001


On December 3, jm at jmason.org said:
> So, for example, let's say you have 4 xterms (or rxvts etc.), and you
> cd into directory ~/blah/foo/bar/baz/deep/somewhere in one; you then
> decide you want to be there for all the other 3.  Rather than doing
> "pwd", rodenting around to cut the directory name, typing "cd ",
> pasting, and doing the same for the other 2, this would allow me to
> 
> 	cd ~/blah/foo/bar/baz/deep/somewhere
> 	cut-cd-pwd
> 
> 		[which loads up "cd ~/blah/foo/bar/baz/deep/somewhere"
> 		into the cut buffer]
> 
> then just paste into the other 3.  Avoiding the cut-phase reduces
> quite a lot of rodent use -- ie good for me wrists.  (I seem to do
> this cd thing quite often ;)

Well, xprop looks like it allows you to set properties, although
damned if I can figure out in short notice how to make it work - xprop
-root -set CUT_BUFFER0 "`pwd`" doesn't seem to work for me, and both
the error message and the manual page are less than helpful. But I
figure you should be able to work with that. Also, it should be pretty
trivial to hack together an X program that frobs the correct
root-window property to do what you want.

Cheers,
Waider.
-- 
waider at waider.ie / Yes, it /is/ very personal of me.

"for god's sake, give me some credit.  i may be an egocentric jerk, but i'm
 not a COMPLETE asshole." - Meredith




More information about the ILUG mailing list