-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
This page helps you solve common issues with the Compose for Desktop Wizard and generated projects that have occurred so far.
Resolution: Fixed a critical Linux desktop integration issue in Compose for Desktop's packageReleaseDeb task.
The official Compose for Desktop packageReleaseDeb task generated .desktop files with missing critical metadata:
-
Missing
StartupWMClassparameter - Linux window managers couldn't associate running windows with desktop entries -
Nameparameter - Apps showedmainClass's name instead of actual app names - Result: After installing, the app's icon was a generic "settings wrench" icon instead of proper app icons in the dock/taskbar
# What Compose was generating (broken):
[Desktop Entry]
Name=MainKt
Exec=/opt/packageName/bin/packageName
Icon=/opt/packageName/lib/packageName.png
# Missing: StartupWMClass=ActualMainClassName
# What Linux desktop environments need:
StartupWMClass=MainClassName # Links window to .desktop entry
Name=Your Actual App Name # Proper display name in menu and dockAdded custom Gradle tasks to post-process .deb packages:
-
addStartupWMClassToDebDynamic- Automatically fixes.desktopfiles by:- Extracting the built
.debpackage - Modifying the desktop entry to include proper
StartupWMClassandNamevalues - Rebuilding the package with correct metadata
- Extracting the built
-
packageDebWithWMClass- One-command release process:- Runs
packageDeborpackageReleaseDeb - Automatically applies desktop integration fixes
- Interactive task selection
- Runs
- β Proper Linux desktop integration - Apps now show correct icons in docks/taskbars
- β Professional appearance - No more generic Ubuntu wrench icons
- β Compliant with FreeDesktop.org standards
- β Automated fix - No manual intervention required
# For new release builds with proper desktop integration:
./gradlew packageDebWithWMClassProblem: Running ./gradlew results in "Permission denied"
- Solution: Make the Gradle wrapper executable:
chmod +x gradlewProblem: Windows installer doesn't recognize updates and installs alongside an old version
- Solution: Generate and set a permanent upgrade UUID:
./gradlew generateUpgradeUuidCopy the generated UUID and paste it into the upgradeUuid field in your build.gradle.kts only once. This ensures MSI installers recognize updates properly.
Problem: Release builds fail with ClassNotFoundException related to serialization
-
Solution: The generated
proguard-rules.proincludes comprehensive rules for Kotlin Serialization. If you add custom@Serializableclasses, ensure they're included:
// Add to proguard-rules.pro for custom serializable classes:
-keep class yourpackage.YourSerializableClass { *; }
-keep class yourpackage.YourSerializableClass$$serializer { *; }π¦ Generator | π Wiki Home | π» Repository | π Report Issue
Β© 2025 Compose for Desktop Wizard | Licensed under Apache 2.0 | Made with β€οΈ for the Kotlin/Desktop Developer Community