[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gpm buffer: CLI vs. X



On Monday 21 September 2009 15:15:42 Wayne Topa wrote:
> Boyd Stephen Smith Jr. wrote:
> > On Monday 21 September 2009 14:32:06 Wayne Topa wrote:
> >> Boyd Stephen Smith Jr. wrote:
> >>> On Monday 21 September 2009 12:06:39 Mike McClain wrote:
> >>>> [H]ow can I
> >>>> grab some text on the command line and paste it in X, or vise versa?
> >>>
> >>> I believe xclip <http://sourceforge.net/projects/xclip/> can do this.
> >>> <http://elcasey.wordpress.com/2008/02/12/xclip-use-the-clipboard-from-t
> >>>he - command-line/>
> >>
> >> xclip in Squeeze seems to work from the CLI to X, not vice-versa.
> >
> > Tried "xclip -o", I presume?
>
> I gave up on xclip when I ran the example from the man page
>
> $ xclip -loops 10 -verbose /etc/motd
> Loops: 10
> Connected to X server.
> Using UTF8_STRING.
> Reading /etc/motd...
> Waiting for 10 selection requests, Control-C to quit
>    Waiting for selection request 1 of 10.
>
> I went for a cup of coffee and 10 minutes later it was still
> sitting there.

It sounds like it is waiting on you to paste the contents of the X selection.  
(Usually, this is a middle-click.)

I think, once it sees the selection pasted, it will replace it with /etc/motd, 
again.

> I then ran xclipboard and tried the above again.
> Nothing showed up on the xclipboard or on the CLI.

X11 has two "clipboards": the selection and the cut-buffer[1].  "cut" and 
"copy" commands generally write to the cut-buffer.  Selecting text with the 
mouse generally writes to the selection.  "paste" commands generally read the 
cut-buffer.  Middle-click generally reads from the selection.

Make sure whatever tools you are using are instructed to use the correct 
"clipboard".  I believe xclip can work with either.

> I've too many other things to do to play with it
> anymore.

Well, if you refuse to learn the tools that exist, I'm not sure how I'm 
supposed to help you.  That said, I don't use xclip that much myself.  I have 
used it in the past, but that was before Lenny was released; prehaps something 
has broken in the meantime.

[1] Actually, its more general than that.  You can have multiple resources of 
type Selection or CutBuffer.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: