I am aware of the switches you can pass to each app to make it use native wayland, but is there any way to do it globally?

    • Fisch@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Is there a noticeable benefit to those apps running natively on Wayland vs running through xWayland?

  • dinckel@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    6 months ago

    Depends on your distribution. Arch packages some electron apps in a way, where they can accept their own flags through a dedicated file. For others, it’s just a plain electron-flags.conf in your ~/.config

    I would recommend visiting either the arch wiki, or tour distributions equivalent for details

    Keep in mind that this does not apply to CEF apps, as that’s an entirely different framework

      • dinckel@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        Define bad.

        If you can run native in wayland, run in native wayland. Your performance will be better, and if you need scaling, scaling is considerably better too

      • thayer@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        Like X11, xwayland is not as secure as a pure Wayland environment but I think it’s important to note that hundreds of thousands of desktop Linux users are likely still running X11.

        So, in my opinion, it is not ideal to run xwayland but still completely acceptable for most users who don’t have special security requirements.

        • Vitaly@feddit.uk
          link
          fedilink
          arrow-up
          1
          ·
          6 months ago

          I still run x11 because some of my apps just don’t work on wayland, specifically terminal apps for some reason

      • Presi300@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        They are kinda choppy, when compared to native Wayland apps and screensharing from an app, running in xwayland doesn’t really work…

      • Björn Tantau@swg-empire.de
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        Bad is relative. But I have some problems with scaling on a HiDPI display with some Electron apps. I think that might be solved if they were Wayland native.

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 months ago

    For electron, if ELECTRON_OZONE_PLATFORM_HINT and electron-flags.conf don’t work, you can also add --ozone-platform-hint=wayland to the end of Exec in each .desktop file (also works on Chromium, but not CEF AFAIK).

    There’s also --ozone-platform-hint=auto if you find yourself switching between X11 and Wayland.