-
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 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
StartupWMClass
parameter - Linux window managers couldn't associate running windows with desktop entries -
Name
parameter - Apps showedmainClass
's name instead of actual app names - Result: After installing, app's icon was generic "settings wrench" icon instead of proper app icons in 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 dock
Added custom Gradle tasks to post-process .deb
packages:
-
addStartupWMClassToDebDynamic
- Automatically fixes.desktop
files by:- Extracting the built
.deb
package - Modifying the desktop entry to include proper
StartupWMClass
andName
values - Rebuilding the package with correct metadata
- Extracting the built
-
packageDebWithWMClass
- One-command release process:- Runs
packageDeb
orpackageReleaseDeb
- 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 packageDebWithWMClass
# Or run the fix on existing .deb packages:
./gradlew addStartupWMClassToDebDynamic
Problem: Running ./gradlew
results in "Permission denied"
- Solution: Make the Gradle wrapper executable:
chmod +x gradlew
This is a common issue with ZIP files as they don't preserve Unix executable permissions.
Problem: Windows installer doesn't recognize updates and installs alongside old version
- Solution: Generate and set a permanent upgrade UUID:
./gradlew generateUpgradeUuid
Copy 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.pro
includes comprehensive rules for Kotlin Serialization. If you add custom@Serializable
classes, 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