From: A_Omara on
Hi,

Is there any way that I can copy image file contents to clipboard from
command line in Linux?

I'm using a command line based screenshot program (scrot) but the
output from this command is put in file. I need to have a command to
further copy the snapped image file into clipboard, and encapsulate
this all into simple push button.

Any idea about how to use this?

Thanks in advance,
Ahmad
From: David W. Hodgins on
On Fri, 30 Jul 2010 20:14:50 -0400, A_Omara <ahmad.abdulghany(a)gmail.com> wrote:

> Is there any way that I can copy image file contents to clipboard from
> command line in Linux?

For kde4 with klipper, see
http://milianw.de/code-snippets/access-klipper-clipboard-on-cli-under-kde4

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
From: A_Omara on
Unfortunately, I'm using gnomre :-S

Isn't there similar thing for gnome?

Thanks,
Ahmad

On Jul 30, 5:36 pm, "David W. Hodgins" <dwhodg...(a)nomail.afraid.org>
wrote:
> On Fri, 30 Jul 2010 20:14:50 -0400, A_Omara <ahmad.abdulgh...(a)gmail.com> wrote:
> > Is there any way that I can copy image file contents to clipboard from
> > command line in Linux?
>
> For kde4 with klipper, seehttp://milianw.de/code-snippets/access-klipper-clipboard-on-cli-under...
>
> Regards, Dave Hodgins
>
> --
> Change nomail.afraid.org to ody.ca to reply by email.
> (nomail.afraid.org has been set up specifically for
> use in usenet. Feel free to use it yourself.)

From: David W. Hodgins on
On Fri, 30 Jul 2010 21:05:39 -0400, A_Omara <ahmad.abdulghany(a)gmail.com> wrote:

> Unfortunately, I'm using gnomre :-S
> Isn't there similar thing for gnome?

I just tested the kde version, and it's for text only.
I haven't found anything yet that works for image files,
for either kde or gnome.

From what I have found so far, it looks like a gnome would
require a python script using gtk, but I don't have any
working examples. That's as far as I'm going to search on
this. Hopefully someone else will be able to answer.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
From: pk on
On Fri, 30 Jul 2010 17:14:50 -0700 (PDT)
A_Omara <ahmad.abdulghany(a)gmail.com> wrote:

> Hi,
>
> Is there any way that I can copy image file contents to clipboard from
> command line in Linux?
>
> I'm using a command line based screenshot program (scrot) but the
> output from this command is put in file. I need to have a command to
> further copy the snapped image file into clipboard, and encapsulate
> this all into simple push button.
>
> Any idea about how to use this?

Try xclip, it reads from stdin and should allow you to do

xclip < image.jpg

to copy the image to the clipboard.

*UNTESTED*