If anyone wants to give an ELI5 or a link to a video that ELI5 I’d be incredibly thankful

I swear that all the stuff I find is like super in depth technical stuff that just loses me in no time flat

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    Programs running graphically (Firefox, your file browser, etc.) need a way to tell the system “draw these pixels here”. That’s what the display server does; it takes all these applications, works out where their windows are and manages that pixel data.

    XOrg has historically been the display server in common use, but it’s very old and very cobbled together. It generally struggles with “modern” things that must people expect today. Multimonitor setups, vsync, hdr and all that. They work, but support is hacked together and brittle.

    Wayland is a replacement for XOrg that was designed from scratch to fix a lot of these issues. But it’s been an uphill battle because XOrg is the final boss of legacy codebases.

    tl;dr They’re both software that manages drawing pixels from applications to the display.

    • Gormadt@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      The TLDR was really helpful NGL

      So it’s software that handles software wanting to display things on the screen. Because having each piece of software do it itself would be not only chaos but a massive security concern. And it’s a big deal because it fixes (by replacing) the old software with something that’s easier to work with than the old ways of doing things (due to all new code that’s not spaghetti that’s hacked together over decades).

      Am I close?

      • loutr@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        Because having each piece of software do it itself would be not only chaos but a massive security concern.

        Not really, the main point is that (most) apps don’t know where they are on the screen, whether they’re minimized, on the active workspace, … and they don’t care either. That’s the responsibility of the window manager.

        The app tells the display server “I need a window to display these pixels” and that’s it. And the window manager, well, manages these windows.

        On the topic of security, X11 doesn’t handle security at all, that’s one of the main issues. So any graphical app can read the other windows’ pixels, grab everything you type, everything you copy, … OTOH Wayland isolates apps so they can’t do that by default. Apps that really need to (screenshot apps, …) can use “portals” to ask for these permissions.

        • Gormadt@lemmy.blahaj.zoneOP
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          That’s really interesting and thank you

          I think I’m beginning to get it now, and Wayland does sound better than X11 at least

          • bisby@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            7 months ago

            I use wayland, but be warned that there are downsides.

            X11 is 40 years old. Which means that even though it has 40 years of bad decisions baked into it, it also has 40 years of features and tooling built around it.

            And in some cases, things are purposefully broken in the name of security as mentioned above. Writing a keylogger on X11? Easy. Every app can watch the keyboard even when they aren’t in focus. So if I type my password into firefox, Discord can listen. Hope you don’t have any malicious apps just patiently listening to all your keystrokes.

            Getting rid of input listening sounds great! … Except for the concept of global keybinds. Have a Push to talk button in discord that you need it to be able to listen to while youre playing a game? Sorry, the game is in focus, so discord can’t see ANY of your input. Including the push to talk button. Different wayland servers have different ways of handling this with their portals. Some don’t have it at all. And the ones that do don’t always have great solutions.

            One major issue that has been in wayland debate hell… how do multi-window apps communicate with each other. For example GIMP. The editor window is a separate window from the toolkit which is a separate from the layer view. GIMP on X11 knows where all of its windows are because it can see everything. if you wanted GIMP to save all the window positions, it could. GIMP on Wayland has no idea where each window is relative to each other. Each window knows its own size and shape. And thats it. It doesnt know where on the screen it is. Which means it doesnt know where it’s other sub windows are relative to itself. Which means GIMP on Wayland can’t really save the window positions for next run. Wayland is working on a protocol for handling this, but its been caught up in debate hell last I saw. This is a prime example of a thing X11 had. And Wayland will someday have, but the 40 year headstart and disregard for security gives X11 a huge headstart.

            Most of these problems have workarounds and solutions, but you might find yourself in a situation where you do in fact need to implement a workaround instead of having everything Just Work.

            “Better” means different things to different people. Architecture and security and technologically? Wayland is better. Just Works and its what your apps were probably built to run on so less weird edge case issues? X11 is still better just due to inertia. (And again, I use Wayland, I’m willing to deal with the workarounds, but you do you).