Re: Clipboard in gnome

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

 



I may have found something much better than diodon or clipit.
This clipboard manager is called gpaste so, in debian, it's apt
install gpaste and what you get is a utility called gpaste-client.

	This little jewel can be called using the good old
command line and it produces ASCII text output.  If you want to
save that into a file, you need to remove the checksums which are
sent as the first field and I have no idea yet what a multi-line
file looks like but I was immediately impressed when I saw 6 test
clipboard saves I had made.

	I could get diodon to show them on the screen but it has
no way to export the lines in to a file unless you do something
exotic to the --display= option.  Unfortunately, the man page for
diodon is about 1 screen and it's kind of a one-trick pony which
may do something very well but I'm not sure yet what that is.

	So, if you have this installed on your system, you run it
from either a text-only command line or your terminal window and
type

gpaste-client history

which spits out all the clipboard saves you have.  I piped it
through awk, telling awk to print $2 since each line in this case
was free of spaces.

	Obviously, this won't work for images and multi-word
files containing spaces but a little awk, sed and or perl should
yield something useful.  This is infinitely more useful as a tool
than the other two clipboard managers I have been trying to use
all day.

	There was an earlier posting from Tim who could get this
sequential output with xclip but I never got that to happen.  I
may be doing something wrong, because it turns out I was not
quite getting the syntax right to actually store entries in the
gnome clipboard.

	What you end up doing looks like

#!/bin/sh
cat testfile1 | xclip -sel clip
cat testfile2 | xclip -sel clip
cat testfile3 | xclip -sel clip
cat cbmail | xclip -sel clip
cat tenant | xclip -sel clip

	The -sel clip part means -sellections clipboard

	In other words, the translation of one of these lines
could be read as follows:

cat testfile1 | xclip -sellections clipboard

xclip is the conduit through which your file contents gush to the
actual gnome clipboard.

If you can get and run gpaste-client, you might like it.

Martin McCormick

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]