Pre-flight checklist
Problem description
Electron uses the desktopName property in package.json to determine the XDG App ID: https://www.electronjs.org/docs/latest/api/app#appsetdesktopnamename-linux. This value is supposed to match the base name of the .desktop file installed for the app, e.g.
- XDG app ID:
com.company.MyApp
- File:
/usr/share/applications/com.company.MyApp.desktop
If the XDG App ID doesn't match the filename, desktop environments on Wayland may not be able be able to match icons, keyboard shortcuts, and other portals.
Proposed solution
If desktopName is set in package.json, forge should use it as the basename for the .desktop file it creates.
Ideally, Forge would also show a warning if the value is not set when building Linux targets. A matching App ID is becoming more important in modern desktop environments. Ideally, it should be a FQDN e.g. com.company.MyApp.
Alternatives considered
Forge will currently produce a .desktop file based on the executable name or product name even if desktopName is set. These are not really suitable options especially given the move toward FQDNs.
Additional information
Related to electron/electron#52222.
Pre-flight checklist
Problem description
Electron uses the
desktopNameproperty inpackage.jsonto determine the XDG App ID: https://www.electronjs.org/docs/latest/api/app#appsetdesktopnamename-linux. This value is supposed to match the base name of the .desktop file installed for the app, e.g.com.company.MyApp/usr/share/applications/com.company.MyApp.desktopIf the XDG App ID doesn't match the filename, desktop environments on Wayland may not be able be able to match icons, keyboard shortcuts, and other portals.
Proposed solution
If
desktopNameis set in package.json, forge should use it as the basename for the .desktop file it creates.Ideally, Forge would also show a warning if the value is not set when building Linux targets. A matching App ID is becoming more important in modern desktop environments. Ideally, it should be a FQDN e.g.
com.company.MyApp.Alternatives considered
Forge will currently produce a .desktop file based on the executable name or product name even if
desktopNameis set. These are not really suitable options especially given the move toward FQDNs.Additional information
Related to electron/electron#52222.