-
Notifications
You must be signed in to change notification settings - Fork 54
Image paste (Ctrl+V) fails on Wayland with 'target STRING not available' #856
Copy link
Copy link
Open
Description
Description
Pasting images from clipboard via Ctrl+V in Droid CLI fails on Wayland with error:
Error: target STRING not available
After installing xsel, text paste works but image paste still fails with the same error.
Root Cause
Droid's clipboard handler calls xsel --clipboard --output which only supports text (STRING target). When the clipboard contains an image (image/png), xsel cannot read it.
Claude Code CLI handles this correctly by detecting the clipboard MIME type, saving image data to a temp file, and attaching it as an image. Droid should do the same.
Environment
- OS: Arch Linux (kernel 6.19.8-arch1-1)
- Display server: Wayland (Ghostty terminal)
- Clipboard tools available:
wl-paste,xclip,xsel
Steps to Reproduce
- Copy an image to clipboard (screenshot, browser image, etc.)
- Open Droid CLI session
- Press Ctrl+V to paste
Expected: Image is pasted as an attachment (like Claude Code CLI)
Actual: Error: target STRING not available
Suggested Fix
- Detect clipboard content type before reading (check MIME via
wl-paste --list-typeson Wayland orxclip -selection clipboard -t TARGETSon X11) - If image: read binary data via
wl-paste(Wayland) orxclip -t image/png(X11), save to temp file, attach as image - If text: read as text via current method
- On Wayland, prefer
wl-pasteoverxselfor better compatibility
Workaround
wl-paste > /tmp/screenshot.png
# Then reference the file path in DroidReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels