Make it possible to run under Wayland #2178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1527 by adding the chromium flags needed to run under Wayland.
Flags
Since chromium parses the flags regardless of chainner, preventing the arg parser from throwing an error is enough to make the flags work. Technically, this can be done in v0.19.4 already using
chainner open '' --ozone-platform-hint=auto
, but that's cumbersome and not obvious.Ideally
--ozone-platform-hint
should be enabled by default, but I couldn't find a way to pass it to electron outside of the CLI. The arg parsing would probably have to be done in a wrapper that calls the real chainner binary for this to work.References:
desktopName package.json field
On Wayland, if the .desktop file name doesn't match the app_id, the compositor won't be able to find .desktop file and thus can't find the icon. With the
desktopName
field unset, electron falls back tochaiNNer.desktop
as the app_id, but the Linux makers all package the .desktop file aschainner.desktop
. Since they don't match, the icon is missing. ThedesktopName
field can be used to manually specify the app_id so everything works as expected.