Linux: allow setting the Wayland app_id (JVM/dev runs get "java", so the shell can't match the .desktop entry)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 49/100
Research direction
Start with configureJvmApplication.kt and AppNameResolver, then trace how the Tao backend creates its first window and whether the existing app.id and startup.wm.class properties reach that path. Run the Gradle run task on Wayland and inspect the window's app_id. Done when the JVM/Tao dev run uses the resolved value (preferring startup.wm.class) so it matches the desktop entry.
Written by the indexing model from the issue text.
Description
⚠️ Is your feature request related to a problem? Please describe
On Linux, a Nucleus app launched any way other than through the packaged launcher binary gets
the Wayland app_id java, so the desktop shell can't match the window to its .desktop
entry and the taskbar falls back to a generic icon.
Launching via the Gradle run task, the app_id is the GTK program name, which is java for
any JVM process. The compositor matches windows to .desktop entries by
app_id/StartupWMClass, so nothing matches. The packaged .deb/.rpm is fine — there the
launcher binary is named after the package, so the app_id matches the generated
StartupWMClass. run, java -jar and IDE run configurations are all affected.
Setting icon = painterResource(...) on the window doesn't help: Wayland has no per-window
icon that the shell uses.
Reported downstream as https://github.com/rocketraman/gitvantage/issues/10 — a contributor
running from source sees a generic taskbar icon, while the packaged build is correct.
Environment: Nucleus 2.4.0, JVM (Temurin 25), Fedora 44, KDE Plasma 6 (Wayland), Tao
decorated-window backend.
Steps to reproduce
- Configure
nativeDistributions.linux { packageName = "myapp"; startupWMClass = "MyApp" }. ./gradlew runon a Wayland session.- Inspect the window's
app_id(KWin's window-info overlay, or
qdbus org.kde.KWin /KWin queryWindowInfo) — it reportsjava. - Install the
.rpm/.deband launch it from the app menu —app_idisMyAppand the
icon resolves correctly.
💡 Describe the solution you'd like
On Linux, have the Tao backend set the GTK program name before the first window is realized —
e.g. g_set_prgname(), which is what GDK derives the Wayland app_id from — resolved from
the values Nucleus already computes.
Most of this already exists in the framework; it just isn't applied on the JVM/Tao path:
- The
runtask already injects-Dnucleus.app.id=<resolved id>
(configureJvmApplication.kt, JVM args for the run exec). generateAppPropertieswritesnucleus/nucleus-app.properties(app.id,
startup.wm.class) into a resources srcDir of the main source set, so both keys are on the
classpath during a dev run, not only in packaged builds.AppNameResolver(innucleus.graalvm-runtime) already implements the desired resolution
order —startup.wm.class→app.id→nucleus.app.id→ executable name — but it is only
wired into a GraalVM substitution for AWT'sXToolkit, so it never runs for JVM + Tao.- macOS dev runs already get equivalent treatment (
-Dapple.awt.application.name,
-Xdock:icon). Linux has no counterpart.
It would also help to expose an explicit override — a nucleus.app.wm-class-style system
property, or a parameter on the window API — for apps that need a value different from the
packaged one.
Two smaller notes:
- Prefer
startup.wm.classoverapp.idwhen both are present. They legitimately differ:
Debian policy wants a lowercasepackageName(gitvantage), while the.desktop
StartupWMClassmatches the launcher binary (GitVantage).AppNameResolveralready
prefers the former. - Once this is set at runtime,
startupWMClassin the Gradle DSL and the actualapp_idcan
no longer drift apart, which today is a silent failure that varies by launch method.
🤚 Do you want to develop this feature yourself?
- Yes
- No
- Dominant language
- Kotlin
- Stars
- 393
- Forks
- 27
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 103
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NucleusFramework/Nucleus
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
NucleusFramework/Nucleus#912 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NucleusFramework/Nucleus#475 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
NucleusFramework/Nucleus#901 ·
Maintainers usually reply within 1 day
-
macOS: touchscreen support (MacBook Pro PROLED XDR, macOS 27 gesture-recognizer touch)Possibly taken @kdroidFilter claimed this 8 days ago. Openenhancement macos
Difficulty 5/5 Over a week Newbie friendliness 25/100
NucleusFramework/Nucleus#892 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NucleusFramework/Nucleus#890 ·
Maintainers usually reply within 1 day
All issues in NucleusFramework/Nucleus
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
streetcomplete/StreetComplete#7364 · 7 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Kotlin-server-squad/vizcore#285 ·
Maintainers usually reply within 1 day
-
assertions 🔍
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100