This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Insert image to clipboard

Tags: None
(comma "," separated)
fri.K
Registered Member
Posts
2
Karma
0

Insert image to clipboard

Sun Aug 05, 2012 2:51 pm
How can I insert image to clipboard from command line in KDE? I know that X11 likes only string in both clipboards but in KDE if I use ksnapshot i can press "copy" and then just prest ctrl+v in ex. gimp to paste image into.
I tried:
Code: Select all
xsel --clipboard < /tmp/image.jpg
xsel --clipboard --keep <  /tmp/image.jpg
cat  /tmp/image.jpg | xsel -i
cat  /tmp/image.jpg | xclip -selection c
echo  /tmp/image.jpg | xclip -selection c

None of above works for me.

OS: Fedora 16/17 x86_64
KDE: 4.8.4
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Insert image to clipboard

Thu Aug 09, 2012 12:26 pm
Please see http://superuser.com/questions/199285/h ... pplication
It requires the use of a Python script it seems, but it is possible.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
fri.K
Registered Member
Posts
2
Karma
0

Re: Insert image to clipboard

Wed Aug 15, 2012 8:49 am
bcooksley wrote:It requires the use of a Python script it seems, but it is possible.
Yes, it does work in Gnome3 but doesn't work in KDE4. They even said that "Note: this is for gnome desktop (hence gtk). I bet there's something similar for kde".
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Insert image to clipboard

Fri Aug 17, 2012 12:43 pm
Oh. Note that script should still work under KDE - although you will need PyGtk installed.
As for a KDE/Qt alternative, it should be possible. I would recommend looking at the QClipboard documentation.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar