Gollum
Gollum

Reputation: 61

ubuntu 20.04 xclip targets has not image types

Currently I am not able to copy/paster images in gnome, especially for screenshots. When take a screenshot and save to clipboard using keyboard short cuts Ctrl+Alt+PrintScreen, an error message output in journal says "Failed to store clipboard: Format image/svg+xml not supported".

And too few targets of clip command outputs, not contain a target type like image/png, image/jpeg etcd.

Did I missing any packages in my system, or any configuartion changes shoule be done to sovle this problem?

System Version: Ubuntu 20.04.2 LTS Gnome-shell Version: 3.36.9-0ubuntu0.20.04.2 xclip version: 0.13-1

Upvotes: 3

Views: 2198

Answers (1)

smoors
smoors

Reputation: 333

The image targets are indeed not visible if you run this for the first time in ubuntu 20.04:

xclip -selection clipboard -t TARGETS -o

However, they are still available. For example, this works:

xclip -selection clipboard -t image/png -out >image.png

After running the above command, the targets become visible:

xclip -selection clipboard -t TARGETS -o
TIMESTAMP
TARGETS
MULTIPLE
image/png
image/bmp
image/x-bmp
image/x-MS-bmp
image/x-icon
image/x-ico
image/x-win-bitmap
image/vnd.microsoft.icon
application/ico
image/ico
image/icon
text/ico
image/jpeg
image/tiff
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain
text/uri-list

Upvotes: 3

Related Questions