Skip to content

Bug: opencode-desktop window does not appear on KDE Plasma Wayland when launched from terminal #24530

Closed as not planned

Description

@Adiker

Bug Report

Description

The opencode-desktop GUI window never appears when the app is launched from a terminal emulator
(Konsole) on KDE Plasma 6 with a Wayland session. The backend sidecar spawns successfully and logs
show the app initializing, but no window is ever displayed.

Steps to Reproduce

  1. Run KDE Plasma 6 on Wayland (tested with KWin + AMD GPU)
  2. Open Konsole (or any terminal inheriting the full KDE session environment)
  3. Run opencode-desktop
  4. Observe: sidecar spawns, logs show "Initializing app" + "Spawning sidecar", but no window appears

Expected Behavior

A GUI window should open.

Actual Behavior

No window appears. The process runs (sidecar is active), but the Tauri/WebKitGTK window is never
shown. No errors are printed to stdout/stderr.

Root Cause

The XAUTHORITY environment variable is set in KDE Plasma sessions (pointing to
/run/user/1000/xauth_*). When this variable is present, the app (or one of its subcomponents —
likely WebKitWebProcess or libX11-based internals) successfully authenticates with XWayland and
creates the window under X11. The X11 window is never composited/shown by KWin Wayland, making it
invisible.

Note: setting GDK_BACKEND=wayland alone does not fix the issue, because it only affects the
GDK rendering layer. Other components (WebKitGTK subprocess, clipboard, etc.) can still connect
to X11 via libX11 directly as long as XAUTHORITY is present.

Workaround

env --unset=XAUTHORITY opencode-desktop

Suggested Fix

Unset XAUTHORITY in the Tauri app startup code before window creation:

// In src-tauri/src/lib.rs, before window creation:
std::env::remove_var("XAUTHORITY");

Environment

  • OS: EndeavourOS (package: opencode-desktop-bin from AUR)
  • Desktop: KDE Plasma 6, Wayland session
  • GPU: AMD Radeon RX 7800 XT (Navi 32)
  • Display server: KWin Wayland + XWayland
  • webkit2gtk version: webkit2gtk-4.1

Plugins

No response

OpenCode version

v1.14.25

Steps to reproduce

  1. Run KDE Plasma 6 on Wayland with XWayland active
  2. Open Konsole — XAUTHORITY is set automatically in the KDE session environment
  3. Run opencode-desktop
  4. Observe: process starts, sidecar spawns (opencode-cli --serve), but no window ever appears
  5. Confirm XAUTHORITY is the culprit: (unset XAUTHORITY && opencode-desktop) — window appears correctly
  6. Confirm GDK_BACKEND=wayland alone does NOT fix it: (GDK_BACKEND=wayland opencode-desktop) — window still does not appear

Screenshot and/or share link

No response

Operating System

EndeavourOS (Arch-based)

Terminal

Konsole

Activity

  1. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  2. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions