pasting images doesn't work on konsole, linux #3949

Open
opened 2026-02-16 17:42:03 -05:00 by yindo · 7 comments
Owner

Originally created by @scarf005 on GitHub (Dec 28, 2025).

Originally assigned to: @kommander on GitHub.

Description

on konsole, linux, ctrl+v image paste isn't working.

OpenCode version

1.0.206

Steps to reproduce

  1. on firefox, copy screenshot with ctrl+shift+s (or copy any image, in general)
  2. open opencode on konsole, try to paste with ctrl+v
  3. it doesn't do anything
  4. drag-and-dropping existing image file works, probably because it recognizes file path

Screenshot and/or share link

No response

Operating System

fedora 42, linux, kinoite

Terminal

konsole

Originally created by @scarf005 on GitHub (Dec 28, 2025). Originally assigned to: @kommander on GitHub. ### Description on konsole, linux, ctrl+v image paste isn't working. ### OpenCode version 1.0.206 ### Steps to reproduce 1. on firefox, copy screenshot with ctrl+shift+s (or copy any image, in general) 2. open `opencode` on `konsole`, try to paste with `ctrl+v` 3. it doesn't do anything 4. drag-and-dropping existing image file works, probably because it recognizes file path ### Screenshot and/or share link _No response_ ### Operating System fedora 42, linux, kinoite ### Terminal konsole
yindo added the opentuibug labels 2026-02-16 17:42:03 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 28, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4077: In Memory Image can't be Pasted in Opencode After TUI Upgrade (similar clipboard image paste failure)
  • #3816: Clipboard image paste fails with AI_DownloadError due to binary corruption and encoding mismatch (technical analysis of the root cause)
  • #5640: copy paste api key under kubuntu (paste functionality issues on Konsole/Kubuntu)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 28, 2025): This issue might be a duplicate of existing issues. Please check: - #4077: In Memory Image can't be Pasted in Opencode After TUI Upgrade (similar clipboard image paste failure) - #3816: Clipboard image paste fails with AI_DownloadError due to binary corruption and encoding mismatch (technical analysis of the root cause) - #5640: copy paste api key under kubuntu (paste functionality issues on Konsole/Kubuntu) Feel free to ignore if none of these address your specific case.
Author
Owner

@dhruvkej9 commented on GitHub (Dec 28, 2025):

copy paste is not working on WSL Ubuntu 24.04 as well

@dhruvkej9 commented on GitHub (Dec 28, 2025): copy paste is not working on WSL Ubuntu 24.04 as well
Author
Owner

@efyandro commented on GitHub (Dec 30, 2025):

try shift + insert

@efyandro commented on GitHub (Dec 30, 2025): try shift + insert
Author
Owner

@scarf005 commented on GitHub (Dec 31, 2025):

try shift + insert

tried but didn't work

@scarf005 commented on GitHub (Dec 31, 2025): > try shift + insert tried but didn't work
Author
Owner

@Nab0y commented on GitHub (Jan 6, 2026):

Same issue on Kitty + Wayland
Environment:

  • OS: Alt Linux
  • Session: Wayland
  • Terminal: Kitty
  • OpenCode: 1.1.3
  • Clipboard tool: wl-clipboard (installed and working)

Confirmed: Ctrl+V paste and drag & drop don't work for images.
wl-paste --list-types shows image/png and other formats correctly, so clipboard works fine.

Workaround:
Created a custom command /paste-image that saves clipboard image via script and references it:
~/.config/opencode/command/paste-image.sh:

#!/bin/bash
IMG_PATH="/tmp/opencode-clipboard-image.png"
if wl-paste --type image/png > "$IMG_PATH" 2>/dev/null; then
    echo "Image saved: $IMG_PATH"
else
    echo "ERROR: No image in clipboard"
    exit 1
fi

~/.config/opencode/command/paste-image.md:

---
description: Paste image from clipboard (Wayland workaround)
---
!`~/.config/opencode/command/paste-image.sh`
Analyze the image at @/tmp/opencode-clipboard-image.png
$ARGUMENTS

Usage: /paste-image what is on this image?
Works as expected, but native clipboard paste would be much better.

@Nab0y commented on GitHub (Jan 6, 2026): Same issue on Kitty + Wayland Environment: - OS: Alt Linux - Session: Wayland - Terminal: Kitty - OpenCode: 1.1.3 - Clipboard tool: wl-clipboard (installed and working) Confirmed: Ctrl+V paste and drag & drop don't work for images. wl-paste --list-types shows image/png and other formats correctly, so clipboard works fine. Workaround: Created a custom command /paste-image that saves clipboard image via script and references it: ~/.config/opencode/command/paste-image.sh: ```bash #!/bin/bash IMG_PATH="/tmp/opencode-clipboard-image.png" if wl-paste --type image/png > "$IMG_PATH" 2>/dev/null; then echo "Image saved: $IMG_PATH" else echo "ERROR: No image in clipboard" exit 1 fi ``` ~/.config/opencode/command/paste-image.md: ```markdown --- description: Paste image from clipboard (Wayland workaround) --- !`~/.config/opencode/command/paste-image.sh` Analyze the image at @/tmp/opencode-clipboard-image.png $ARGUMENTS ``` Usage: /paste-image what is on this image? Works as expected, but native clipboard paste would be much better.
Author
Owner

@riatzukiza commented on GitHub (Jan 11, 2026):

Also stopped working for gpt 5.2 codex oauth. I am using allacritty on ubuntu 24.04 on i3 + kde plasma x11

@riatzukiza commented on GitHub (Jan 11, 2026): Also stopped working for gpt 5.2 codex oauth. I am using allacritty on ubuntu 24.04 on i3 + kde plasma x11
Author
Owner

@dhruvkej9 commented on GitHub (Jan 12, 2026):

Same issue on Kitty + Wayland Environment:

  • OS: Alt Linux
  • Session: Wayland
  • Terminal: Kitty
  • OpenCode: 1.1.3
  • Clipboard tool: wl-clipboard (installed and working)

Confirmed: Ctrl+V paste and drag & drop don't work for images. wl-paste --list-types shows image/png and other formats correctly, so clipboard works fine.

Workaround: Created a custom command /paste-image that saves clipboard image via script and references it: ~/.config/opencode/command/paste-image.sh:

#!/bin/bash
IMG_PATH="/tmp/opencode-clipboard-image.png"
if wl-paste --type image/png > "$IMG_PATH" 2>/dev/null; then
echo "Image saved: $IMG_PATH"
else
echo "ERROR: No image in clipboard"
exit 1
fi
~/.config/opencode/command/paste-image.md:


description: Paste image from clipboard (Wayland workaround)

!~/.config/opencode/command/paste-image.sh
Analyze the image at @/tmp/opencode-clipboard-image.png
$ARGUMENTS
Usage: /paste-image what is on this image? Works as expected, but native clipboard paste would be much better.

How to paste multiple images ???

@dhruvkej9 commented on GitHub (Jan 12, 2026): > Same issue on Kitty + Wayland Environment: > > * OS: Alt Linux > * Session: Wayland > * Terminal: Kitty > * OpenCode: 1.1.3 > * Clipboard tool: wl-clipboard (installed and working) > > Confirmed: Ctrl+V paste and drag & drop don't work for images. wl-paste --list-types shows image/png and other formats correctly, so clipboard works fine. > > Workaround: Created a custom command /paste-image that saves clipboard image via script and references it: ~/.config/opencode/command/paste-image.sh: > > #!/bin/bash > IMG_PATH="/tmp/opencode-clipboard-image.png" > if wl-paste --type image/png > "$IMG_PATH" 2>/dev/null; then > echo "Image saved: $IMG_PATH" > else > echo "ERROR: No image in clipboard" > exit 1 > fi > ~/.config/opencode/command/paste-image.md: > > --- > description: Paste image from clipboard (Wayland workaround) > --- > !`~/.config/opencode/command/paste-image.sh` > Analyze the image at @/tmp/opencode-clipboard-image.png > $ARGUMENTS > Usage: /paste-image what is on this image? Works as expected, but native clipboard paste would be much better. How to paste multiple images ???
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3949