anytype-ts icon indicating copy to clipboard operation
anytype-ts copied to clipboard

Running the app in native Wayland mode for users running on Linux's Wayland session

Open archerallstars opened this issue 2 years ago • 6 comments

Have you read a contributing guide?

  • [X] I have read CONTRIBUTING.md
  • [X] I have searched the existing requests and didn't find any that were similar
  • [X] I have considered creating a pull request instead and want to proceed

Clear and concise description of the problem

Currently, the app runs in XWayland mode instead of native Wayland mode. Running in XWayland mode makes everything look blurry with fractional scaling enabled, as shown in the screenshot below (desktop fractional scaled at 125%):

Screenshot from 2023-09-30 22-57-17

XWayland mode(left), native Wayland mode(right)

Suggested solution

Using --ozone-platform-hint=auto flag by default. This flag automatically checks whether the users are running on X11 or Wayland session, then uses the appropriate mode.

--enable-features=WaylandWindowDecorations is also necessary to enable Wayland's window decorations.

Alternative

Currently, I am running the app with this command to enable native Wayland mode in my Wayland session:

./Anytype-0.35.2.AppImage --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto

Additional context

No response

archerallstars avatar Oct 01 '23 02:10 archerallstars

I tried adding the flag to my build, but it doesn't seem to have any effect at all. I don't know why 🤯

archerallstars avatar Oct 01 '23 07:10 archerallstars

@kreaninw did you have any luck in getting it to run on wayland? I still haven't figured out how to do it -- those flags work for most of the Electron apps I use but not for Anytype.

astrocaat avatar Nov 02 '23 19:11 astrocaat

@kreaninw did you have any luck in getting it to run on wayland? I still haven't figured out how to do it -- those flags work for most of the Electron apps I use but not for Anytype.

As of Anytype 0.3.54, I can run the app on native Wayland with this launch flag:

./Anytype-0.35.4.AppImage --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto

archerallstars avatar Nov 03 '23 01:11 archerallstars

Yup, I used those flags and still doesn't run on Wayland :( I'm on ArchLinux with GNOME by the way.

astrocaat avatar Nov 03 '23 08:11 astrocaat

I'm unable to run Anytype under Wayland natively too. NixOS + Hyprland.

bcyran avatar Sep 28 '24 06:09 bcyran