[BUG] Can't paste image from clipboard on Linux (Ubuntu)

Status Open
Maintainer reply ✓ Yes — claude[bot]
Activity 46 comments · opened Sep 28, 2025
💡 Likely answer: A maintainer (claude[bot], contributor) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Using Ubuntu Linux, I'm unable to paste an image from my clipboard into the CLI.

System: Ubuntu 25.04 + KDE (Wayland).

Verified that the image is on the clipboard by pasting into GIMP and with:

wl-paste --list-types

application/x-qt-image        
     image/png
     image/avif

However, after pasting, Claude Code flashes:

<img width="776" height="179" alt="Image" src="https://github.com/user-attachments/assets/3b803f1c-ff37-488f-80e1-b62aaf667382" />

What Should Happen?

Image should paste into the CLI (FYI, using Konsole)

Error Messages/Logs

N/A

Steps to Reproduce

Use environment as above.

Install claude with npm, upgrade to lastest version

Copy an image onto the clipboard

Paste into the CLI

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.0.128 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Shell = konsole

View original on GitHub ↗

46 Comments

github-actions[bot] · 11 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1361
  2. https://github.com/anthropics/claude-code/issues/834

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

scottwilson312 · 11 months ago

This was working for me until this latest update. Ubuntu

sniggl · 10 months ago

can confirm the issue System: Ubuntu 25.04 + KDE (Wayland).

doug7410 · 10 months ago

can confirm same issue on Arch 6.16.10

Jaakkonen · 10 months ago

I have same issue with Sway on NixOS. wl-paste shows the contents properly but claude code (v2.0.1) cannot find image from clipboard.

❯ wl-paste --list-types            
image/png
❯ wl-paste | hexyl -n50 
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 89 50 4e 47 0d 0a 1a 0a ┊ 00 00 00 0d 49 48 44 52 │×PNG__•_┊⋄⋄⋄_IHDR│
│00000010│ 00 00 01 1b 00 00 03 b6 ┊ 08 02 00 00 00 57 52 a4 │⋄⋄••⋄⋄•×┊••⋄⋄⋄WR×│
│00000020│ 6f 00 00 20 00 49 44 41 ┊ 54 78 9c ec 9d 77 78 14 │o⋄⋄ ⋄IDA┊Tx×××wx•│
│00000030│ 47 9a                   ┊                         │G×      ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
jasonish · 10 months ago

Same issue on Arch Linux, Wayland (Hyprland) and the Kitty Terminal. I can paste images when running Claude Code inside VScode.

monneyboi · 10 months ago

Same here on up-to-date Arch linux, KDE plasma using wayland and konsole terminal emulator. Fairly basic setup.

perroboc · 10 months ago

Same using Fedora 42 KDE, Konsole.

CJPoll · 10 months ago

Gentoo -> Wayland -> Hyprland with Alacritty. Same issue. wl-paste shows things are correct, the same as Jaakkonen above.

hemangjoshi37a · 9 months ago

CONGRATULATIONS : i successfully resolved the issue. basically using ubuntu in wayland makes the image paste by CTRL+V work in claude code while in X11 does not work.

chmouel · 9 months ago

i am using this and it worked for me https://gist.github.com/chmouel/d2dd4ebea0782ce61d93e1d22a9995cf on wayland/kitty

0xferrous · 9 months ago

i've got a workaround where a different keybinding that screenshots and copies the path to clipboard and then claude reads from specified path

teito-dev · 9 months ago

Same here facing this issue , im on ubuntu with x11 after the latest update

fingertap · 9 months ago

Any updates? I use copyq, cannot paste image with ctrl+v.

pgnjidic · 8 months ago

For Ubuntu users who have issues pasting images into Claude Code from the clipboard:
In version 2.0.52, this was already addressed:

Fixed image pasting not working on Linux systems running Wayland (now falls back to wl-paste when xclip is unavailable)

However, if image pasting still does not work for you, simply installing xclip usually fixes the issue:

sudo apt install xclip

butvinm · 8 months ago
For Ubuntu users who have issues pasting images into Claude Code from the clipboard: In version 2.0.52, this was already addressed: Fixed image pasting not working on Linux systems running Wayland (now falls back to wl-paste when xclip is unavailable) However, if image pasting still does not work for you, simply installing xclip usually fixes the issue: sudo apt install xclip

This fixed the issue for me on Manjaro, thanks!

sinnick · 8 months ago
For Ubuntu users who have issues pasting images into Claude Code from the clipboard: In version 2.0.52, this was already addressed: Fixed image pasting not working on Linux systems running Wayland (now falls back to wl-paste when xclip is unavailable) However, if image pasting still does not work for you, simply installing xclip usually fixes the issue: sudo apt install xclip

this worked on ubuntu on x11 aswell, FINALLY!

JGKle · 8 months ago

I'm using Claude 2.0.75 on KDE Neon 6.2, X11. Even with xclip, pasting images still doesn't work for me in Konsole :(

pgnjidic · 8 months ago
I'm using Claude 2.0.75 on KDE Neon 6.2, X11. Even with xclip, pasting images still doesn't work for me in Konsole :(

Have you tried with wl-paste maybe?

JGKle · 8 months ago
> I'm using Claude 2.0.75 on KDE Neon 6.2, X11. Even with xclip, pasting images still doesn't work for me in Konsole :( Have you tried with wl-paste maybe?

wl-paste is for wayland, no? Not X11....?

lizozom · 8 months ago

@sinnick this worked for me on Ubuntu. Thanks!

pgnjidic · 8 months ago
@sinnick this worked for me on Ubuntu. Thanks!

That was my hint actually 🥇

JGKle · 8 months ago

@lizozom are you using X11 or Wayland? It's still broken for me on X11, even with that installed

sinnick · 8 months ago
@lizozom are you using X11 or Wayland? It's still broken for me on X11, even with that installed

what terminal are you using? for me it works using ghostty on Ubuntu 24.04

JGKle · 8 months ago
> @lizozom are you using X11 or Wayland? It's still broken for me on X11, even with that installed what terminal are you using? for me it works using ghostty on Ubuntu 24.04

Konsole (mentioned above - same as the OP)

bywwcnll · 7 months ago
For Ubuntu users who have issues pasting images into Claude Code from the clipboard: In version 2.0.52, this was already addressed: Fixed image pasting not working on Linux systems running Wayland (now falls back to wl-paste when xclip is unavailable) However, if image pasting still does not work for you, simply installing xclip usually fixes the issue: sudo apt install xclip

this worked on Ubuntu 24.04.3 LTS

iadnanahsan · 7 months ago

Working fix for Ubuntu users

I am on Ubuntu 24.04.3 LTS, and I was also unable to paste screenshots into Claude Code. The terminal kept saying no image found, even though the image was in my clipboard.

Running the following command fixed the issue for me:

sudo apt install xclip

After installing xclip, I can paste screenshots again with Ctrl + V without saving or dragging files.

So if you are on Linux and paste is not working, try installing xclip first. It solves the problem instantly on my machine.

Spirit597 · 7 months ago

sudo apt install xclip This works for me (Ubuntu 24.04, X11)

chandrasekharan98 · 6 months ago

If you're using x11 then xclip is needed and if you're on wayland then wl-clipboard would help. Here's a quick one-liner

if [[ "$XDG_SESSION_TYPE" == "wayland" || -n "$WAYLAND_DISPLAY" ]]; then
  sudo apt install -y wl-clipboard; else sudo apt install -y xclip; fi
JGKle · 6 months ago

doesn't work for me on x11 even with xclip installed.

vladis315 · 6 months ago

for me Ctrl + Shift + v did the trick, instead of Ctrl + v only

JGKle · 6 months ago
for me Ctrl + Shift + v did the trick, instead of Ctrl + v only

At last - confirmed, this was the solve. ClaudeCode must be intercepting the key commands in a weird way tho, because Konsole doesn't have Ctrl+Shift+V mapped to anything (only Ctrl+V is mapped to paste):

<img width="459" height="256" alt="Image" src="https://github.com/user-attachments/assets/d36a0be1-6381-409f-a6bc-54184b4d24e0" />

Would be nice if they'd fix this given how many different issues there are here about not being able to paste images.

kaiqueocanha · 6 months ago

can confirm it still happens on ubuntu

jod-alef · 5 months ago
If you're using x11 then xclip is needed and if you're on wayland then wl-clipboard would help. Here's a quick one-liner if [[ "$XDG_SESSION_TYPE" == "wayland" || -n "$WAYLAND_DISPLAY" ]]; then sudo apt install -y wl-clipboard; else sudo apt install -y xclip; fi

For wayland wl-clipboard was the answer. Now I can paste images again in konsole. Thanks.

maxiloEmmmm · 5 months ago
sudo apt install -y wl-clipboard
If you're using x11 then xclip is needed and if you're on wayland then wl-clipboard would help. Here's a quick one-liner if [[ "$XDG_SESSION_TYPE" == "wayland" || -n "$WAYLAND_DISPLAY" ]]; then sudo apt install -y wl-clipboard; else sudo apt install -y xclip; fi

work on Ubuntu 24.04.4 LTS

briaguya0 · 5 months ago

same issue, debian testing, GNOME 50, ddterm

CGQAQ · 5 months ago
If you're using x11 then xclip is needed and if you're on wayland then wl-clipboard would help. Here's a quick one-liner ``bash if [[ "$XDG_SESSION_TYPE" == "wayland" || -n "$WAYLAND_DISPLAY" ]]; then sudo apt install -y wl-clipboard; else sudo apt install -y xclip; fi ``

Worked for me, thank you!

hqhq1025 · 4 months ago

If you're SSH'd from macOS into Linux: clipaste v2.1.0 bridges your local clipboard to the remote server.

# On your Mac
brew install hqhq1025/clipaste/clipaste && brew services start clipaste
clipaste ssh-setup user@your-linux-server

After setup, Ctrl+V in remote Claude Code fetches the screenshot through an SSH tunnel. No X11 or display server needed.

kevinfengcs88 · 3 months ago
If you're using x11 then xclip is needed and if you're on wayland then wl-clipboard would help. Here's a quick one-liner if [[ "$XDG_SESSION_TYPE" == "wayland" || -n "$WAYLAND_DISPLAY" ]]; then sudo apt install -y wl-clipboard; else sudo apt install -y xclip; fi

Worked for me on Pop!_OS 22.04

Thanks :)

lukeduda · 3 months ago

Cheers jod-alef!

xuanswe · 3 months ago

I installed wl-clipboard and it works on Ubuntu 24. Recently, upgrade to Ubuntu 26, it stops working.

EDIT: don't know how ubuntu (or claude code) fixed itself later. I only lock the screen and go for lunch, and it works again now.

SevenSystems · 3 months ago

The problem is not the fact that CC requires xclip; the problem is that the error message is wrong. It should be "xclip is required to paste images. Please install it."

tschallacka · 1 month ago

wl-clipboard fixed it for me on ubuntu 26.04 and kde with wayland.

claude[bot] contributor · 12 days ago

Confirmed / reproduced on 2.1.235 (Linux), narrowed down:

  • With xclip installed (X11) or wl-clipboard installed (Wayland), Ctrl+V attaches the clipboard image as [Image #1] as expected.
  • With neither tool installed, Ctrl+V only flashes "No image found in clipboard. Use ctrl+v to paste images." It never says that a clipboard tool is missing, which is the misleading part most commenters here ran into.

So the remaining bug is the error message (plus the dependency not being documented). Workaround until then: install wl-clipboard on Wayland or xclip on X11 and image paste works.

🤖 Generated with Claude Code

---
_Generated by Claude Code_

g-i-o-r-g-i-o · 18 hours ago

⚠️ If you already installed all the clipboard tools and paste STILL fails — press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd>

<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> WORKS. <kbd>Ctrl</kbd>+<kbd>V</kbd> does nothing and <kbd>Alt</kbd>+<kbd>V</kbd> does nothing, but <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> attaches the image instantly. This is the fix for the cohort this thread keeps missing — same as @vladis315 and @JGKle found in February, now confirmed on a completely different setup.

I already have ALL the clipboard packages installedxclip, xsel and wl-clipboard (both wl-copy and wl-paste), verified below with paths and working output. The "just install xclip / install wl-clipboard" answer repeated ~35 times in this thread does NOT apply to us, and this issue should not be closed as solved by it. The real defect is that Ctrl+V never reaches the app at all — it is a key-handling bug, not a clipboard-reading one.

Same failure on Ubuntu GNOME / Wayland, Claude Code 2.1.251. Adding data that narrows this down, because here every environmental cause is ruled out.

All clipboard helpers installed:

xclip     /usr/bin/xclip
xsel      /usr/bin/xsel
wl-paste  /usr/bin/wl-paste
wl-copy   /usr/bin/wl-copy

When paste fails, the image IS on the clipboard and BOTH stacks read it correctly:

$ wl-paste --type image/png > clip-wl.png
$ xclip -selection clipboard -t image/png -o > clip-x.png
$ ls -l clip-wl.png clip-x.png
-rw-rw-r-- 128760 clip-wl.png
-rw-rw-r-- 128760 clip-x.png
$ file clip-wl.png
clip-wl.png: PNG image data, 336 x 188, 8-bit/color RGBA, non-interlaced

Byte-identical, valid PNG. The clipboard and the helper binaries are healthy — the failure is inside Claude Code.

Full target list at failure time, in the order offered:

audio/x-riff
image/webp
image/tiff
text/ico
image/icon
image/ico
application/ico
image/vnd.microsoft.icon
image/x-win-bitmap
image/x-ico
image/x-icon
image/x-MS-bmp
image/x-bmp
image/bmp
image/jpeg
image/png
text/_moz_htmlcontext
text/_moz_htmlinfo
text/html

Two things stand out, and they differ from the KDE list in the original report:

  1. There is no text/plain target at all.
  2. The first-offered type is audio/x-riff, not an image type.

If the reader takes the first entry, or probes in offer order and gives up on a non-image hit, that would explain a silent no-op while image/png sits 16 entries down.

(Source is Firefox — hence the text/_moz_* targets. Same failure with GNOME screenshots, which offer a different, shorter list.)

Other details:

  • <kbd>Ctrl</kbd>+<kbd>V</kbd> fails, <kbd>Alt</kbd>+<kbd>V</kbd> fails, but <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> WORKS — the image attaches instantly on Ubuntu GNOME/Wayland. Second confirmation of what @vladis315 and @JGKle found in February. For those of us who already have every clipboard tool installed, the defect is that Ctrl+V never reaches the app at all, not that the clipboard can't be read.
  • Intermittent: works for a while, then breaks and stays broken — which fits a content-dependent parse, not a missing dependency
  • XDG_SESSION_TYPE=wayland, XDG_CURRENT_DESKTOP=ubuntu:GNOME, TERM=xterm-256color
  • Not vim-mode related. Reproduced identically in all three configurations: vim mode enabled in INSERT mode, vim mode enabled in NORMAL mode, and vim mode disabled entirely. So this is a different defect from #76072 (vim mode swallowing <kbd>Ctrl</kbd>+<kbd>V</kbd> image paste on macOS) — here the editor mode makes no difference at all.
g-i-o-r-g-i-o · 18 hours ago

I had this problem since I started using claude code cli, in windows and ubuntu. It comes and goes, in one version works, then it doesn't, it drives me crazy. Each time I paste something I have no idea what happens.