Skip to content

[Bug]: .deb install on Wayland shows a second, generic dock icon #13975

Description

@TonybynMp4

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Install T3-Code-<version>-amd64.deb on a Wayland session.
  2. Pin T3 Code to the dock and launch it.

Expected behavior

The running window is grouped under the pinned T3 Code launcher.

Actual behavior

Image

A second dock entry with a generic cog icon appears next to the pinned launcher.

The package installs /usr/share/applications/t3code.desktop with Icon=t3code and StartupWMClass=t3code. At startup the app still calls setDesktopName("com.t3tools.T3Code.desktop") (DesktopPreReadyPlatform.ts) and writes a hidden handler entry to ~/.local/share/applications with NoDisplay=true and no Icon=. On Wayland the compositor matches the window by its app id, so it picks that hidden entry over the installed launcher. X11 is unaffected because it matches on WM_CLASS.

Impact

Cosmetic issue

Version or commit

0.0.43-nightly.20260927.2344 (.deb)

Environment

Ubuntu 26.04.1 LTS, GNOME Shell 50.1, Wayland

Related

#10894 has the same setDesktopName root cause on the AppImage. The fix is different here: the .deb installs a real launcher the app can use, while the AppImage has none.

Possible fix

For packaged installs that aren't an AppImage (app.isPackaged && !process.env.APPIMAGE), leaving the AppImage and dev paths as they are:

  • set the desktop name to t3code.desktop, so the app id matches the installed launcher
  • skip writing the hidden handler entry, since the installed .desktop already registers x-scheme-handler/t3code
  • point xdg-mime default at t3code.desktop
  • use the same t3code app id in DesktopSnapShot window matching

I've been shipping this in a fork's .deb builds and can open a PR if it's wanted.

Activity

  1. juliusmarminge commented on Sep 27, 2026

    @juliusmarminge
    Member

    Triage

    The duplicate icon matches current main, including the 0.0.43-nightly.20260927 build. This is the same startup identity bug as #10894, on the .deb rather than the AppImage. It should stay open. #10895 is the related fix and is not in this nightly.

    The .deb installs /usr/share/applications/t3code.desktop (executableName: "t3code", no desktopName) with Icon=t3code and StartupWMClass=t3code (scripts/build-desktop-artifact.ts). On Linux startup, DesktopPreReadyPlatform still writes ~/.local/share/applications/com.t3tools.T3Code.desktop from renderUrlHandlerDesktopEntry (NoDisplay=true, no Icon=, no StartupWMClass) and calls setDesktopName("com.t3tools.T3Code.desktop"). Electron 44.4.2 then uses that name for both the Wayland app id and WM_CLASS. GNOME matches StartupWMClass first, then the desktop-file id. t3code does not match com.t3tools.T3Code, so the hidden entry wins and the pinned launcher stays separate. That hidden entry is intentional for AppImages, whose launcher filename we do not control (DesktopLinuxUrlHandler); it was left without StartupWMClass so it would not take the window. It takes the window anyway because the packaged launcher was never updated to the id setDesktopName actually sets.

    X11 is unaffected is not a safe assumption here. Electron 44 sets WM_CLASS from the desktop name (electron/electron#51424), and --class t3code does not put the main window back on t3code. #10894 already has an X11 trace of WM_CLASS = "com.t3tools.t3code", "com.t3tools.T3Code". The second dock entry is the GNOME Wayland symptom; the identity mismatch is the same on X11.

    Two fixes, and they conflict:

    • Prefer the fix(desktop): Group Linux windows under the installed launcher #10895 direction. Keep the window id at com.t3tools.T3Code and set the installed launcher's StartupWMClass to com.t3tools.T3Code (electron-builder entry and the AUR t3code.desktop files). GNOME then groups the window under the pinned t3code.desktop. Capture bindings stay on com.t3tools.T3Code. Adding Icon=t3code to the hidden handler only fixes a generic glyph; it does not remove the second dock entry.
    • The packaged non-AppImage switch to t3code.desktop is the other coherent fix, but it is larger than the four bullets. linuxDesktopEntryName is also the capture app id in DesktopSnapShot (portal, niri, hyprland), and the GNOME extension only authorizes com.t3tools.T3Code.SnapShot. Changing setDesktopName without those call sites desyncs window capture. The hidden entry is written twice (pre-ready, then DesktopLinuxUrlHandler), and xdg-mime default is pointed at com.t3tools.T3Code.desktop on every packaged launch. A .deb build would also need to retarget that, and existing mimeapps.list entries keep pointing at the old handler until then. AppImage and dev (com.t3tools.T3Code.Development.desktop) still need the hidden handler. This also fights fix(desktop): Group Linux windows under the installed launcher #10895, which moves StartupWMClass the other way. Landing both would break the association again.

    A PR is welcome if it keeps one Linux window id. I would not special-case .deb to t3code unless we also move capture and the scheme handler with it.

  2. added
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Sep 27, 2026
  3. TonybynMp4 commented on Sep 27, 2026

    @TonybynMp4
    ContributorAuthor

    Confirmed that the existing AppImage PR fixes the .deb too so i won't make a conflicting PR! :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions