Re: gpm buffer: CLI vs. X



Boyd Stephen Smith Jr. wrote:
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.


I assumed that you knew that I 'had' middle-clicked in the CLI, Sorry for taking that for granted.

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.

I mentioned I was running Squeeze. I was not asking for help. I was relaying my attempts to get it to do what it says it can do. A CLI -> X
clipboard APP that works is what I wanted. After reading all the docs supplied, as well as Googleing for other methods, I am left still wanting.

Thanks for you replies and sorry if I was not clear in my posts.

Wayne

[1] Actually, its more general than that. You can have multiple resources of type Selection or CutBuffer.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: gpm buffer: CLI vs. X
    ... I believe xclip can do this. ... Waiting for selection request 1 of 10. ... "copy" commands generally write to the cut-buffer. ...
    (Debian-User)
  • Re: Loading clipboard programmatically
    ... I think the first question is - which clipboard? ... Take a look at 'xclip' - ... xclip can also print an X selection ... to standard out, which can then be redirected to a file ...
    (Ubuntu)
  • Re: Loading clipboard programmatically
    ... I think the first question is - which clipboard? ... Take a look at 'xclip' - ... xclip can also print an X selection ... to standard out, which can then be redirected to a file ...
    (Ubuntu)
  • Re: Line oriented protocols vs. [gets]
    ... But while ed's commands are line-oriented, ... naturally handled by Sam as whole-line patterns are by ed, vi, awk, ... matching to obtain other (sub)selections within a given selection. ... The main issue is handling multiple possible regular expressions at ...
    (comp.lang.tcl)
  • Re: Interesting study on spam
    ... Email consists of a set of commands to an MTA/MUA, ... You don't like their selection. ... Videotape is dead. ... to dozens of models that do NOT accept straight ASCII text. ...
    (rec.arts.sf.fandom)