Skip to content

fix(desktop): Linux icon never found on KDE (hicolor/1254x1254) - #57

Merged
ralyodio merged 1 commit into
mainfrom
fix/linux-desktop-icon
Oct 13, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/linux-desktop-icon

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The DiskPush icon showed as generic on Kubuntu/KDE.

Cause. The deb put its only icon at hicolor/1254x1254/apps/diskpush-desktop.png. electron-builder files a single PNG under its pixel size, and the source is 1254px. No index.theme lists a 1254x1254 directory, so Plasma never found the icon.

Also, linux.desktop.entry is electron-builder 26 syntax. Version 25 turned it into the string entry=[object Object] in the .desktop file, and the Keywords line was lost.

Fix

  • linux.icon → resources/icons/: a set of 16 to 512px icons in real hicolor sizes. The deb now installs 8 standard paths.
  • linux.desktop flattened. The deb's entry now has Keywords= and StartupWMClass=DiskPush, and the junk line is gone.
  • The tarball ships the same set, and install.sh installs every size and records each one in the manifest so uninstall removes it. Older bundles fall back to the single 512x512 copy.
  • New tests check that the desktop map is flat and that each icon file is a hicolor size and actually that size.

Verified locally. Built the deb and tar.gz with package-desktop.mjs and inspected the deb's .desktop file and icon paths. Ran the installer's icon loop against the extracted tarball. pnpm test: 796/797 pass. The one failure is tests/live/rsync-behaviour on this box's umask 007, and it passes with umask 022.

🤖 Generated with Claude Code

The deb installed its only icon at hicolor/1254x1254/apps/, because
electron-builder files a single PNG under its pixel size and the source is
1254px. No index.theme lists that directory, so KDE drew a generic icon in
the menu, on the desktop and in the taskbar.

- linux.icon now points at resources/icons/, a 16-512 set of real hicolor
  sizes, so the deb ships eight standard icon paths.
- linux.desktop flattened to the map electron-builder 25 reads; the nested
  `entry` (v26 syntax) was stringified into `entry=[object Object]` and the
  Keywords line was lost.
- The tarball carries the same set (extraResources), and install.sh installs
  every size, tracked in the manifest so uninstall removes them; bundles
  before this still get the single 512x512 copy.
- Tests guard the flat desktop map and that every icon is a hicolor size and
  really that size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit b814b9c into main Oct 13, 2026
5 checks passed
@ralyodio
ralyodio deleted the fix/linux-desktop-icon branch October 13, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant