GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wayland clipboard copy doesn't populate primary clipboard selection · Issue #6110 · anomalyco/opencode

Wayland clipboard copy doesn't populate primary clipboard selection #6110

New issue
Copy link
New issue
Copy link
Closed
#32370
Closed
Wayland clipboard copy doesn't populate primary clipboard selection#6110
#32370
Copy link
Assignees
rekram1-node
Labels
bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Description

@mickalpine
mickalpine
opened on Dec 24, 2025
Issue body actions

Description

When using opencode in Wayland environments with wl-clipboard, copying text via highlight selection or Ctrl+Y only populates the regular clipboard but not the primary clipboard. This prevents pasting to the host OS when using VMware Workstation, which only syncs the primary clipboard between guest and host.

Additional context:

  • wl-clipboard version: 2.2.1
  • In VMware Workstation, only the primary clipboard gets synced between guest and host OS
  • The issue affects both the highlight-to-copy functionality and the Ctrl+Y explicit copy command

Proposed solution:
Add a configuration option to control clipboard behavior in Wayland environments:

{
  "clipboard": {
    "linux": {
      "enablePrimaryCopy": true
    }
  }
}

When enablePrimaryCopy is true, the Wayland copy method should execute both wl-copy and wl-copy --primary.

OpenCode version

v1.0.195

Steps to reproduce

  1. Run opencode TUI in a Wayland environment (Ubuntu 24.04)
  2. Highlight text and copy using Ctrl+Y or text selection
  3. In a terminal, check clipboard contents:
    • wl-paste (regular clipboard) - should show the copied text ✓
    • wl-paste --primary (primary clipboard) - should show the copied text ✗
  4. Try to paste using middle-click (primary clipboard) - fails
  5. Try to paste using Ctrl+V (regular clipboard) - works

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04 (Gnome Wayland)

Terminal

ghostty v1.2.3

Reacted by Lukas and Sergey Egorov

Activity

  1. mickalpine
    added
    bugSomething isn't working
    on Dec 24, 2025
  2. github-actions
    assigned
    rekram1-node
    on Dec 24, 2025
  3. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 24, 2025
  4. github-actions commented on Dec 24, 2025

    @github-actions
    github-actionsBot
    on Dec 24, 2025 – with GitHub Actions
    Contributor
    More actions

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

    • Copy to clipboard broken over SSH (MobaXterm & Windows Terminal) #6111: Copy to clipboard broken over SSH (MobaXterm & Windows Terminal) - Both relate to clipboard functionality not working properly
    • X Window (xorg) middle-click paste doesn't work #6072: X Window (xorg) middle-click paste doesn't work - Related Linux/Wayland clipboard issue
    • copy paste api key under kubuntu #5640: copy paste api key under kubuntu - Another Wayland environment clipboard issue
    • Copy and Paste behaviour under Linux #4754: Copy and Paste behaviour under Linux - General Linux clipboard behavior issue
    • [FEATURE]: On Linux/Wayland allow pasting with middle click #3684: [FEATURE]: On Linux/Wayland allow pasting with middle click - Related Wayland paste functionality

    These issues all relate to clipboard and copy/paste functionality on Linux/Wayland environments. Feel free to ignore if this is addressing a specific edge case not covered by the others.

  5. mickalpine commented on Jan 22, 2026

    @mickalpine
    mickalpine
    on Jan 22, 2026
    Author
    More actions

    @rekram1-node I created a PR to solve this issue #6370

    To enable primary clipboard copy it would be add to opencode config (default is false):

    {
      "clipboard": {
        "linux": {
          "enablePrimaryCopy": true
        }
      }
    }
    Reacted by Shobhit
  6. github-actions commented on Mar 26, 2026

    @github-actions
    github-actionsBot
    on Mar 26, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. github-actions
    closed this as completedon Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.