186
submitted 10 months ago by alexdeathway@programming.dev to c/linux@lemmy.ml

Title

you are viewing a single comment's thread
view the rest of the comments
[-] nous@programming.dev 90 points 10 months ago

Applications needs some coordination between each other in order to act like you would expect - things like one window at a time having focus and thus getting all keyboard and mouse inputs. As well as things like positioning on the screen and which screen to render to, the clipboard, and various others things.

X is a server and set of protocols that applications can implement to allow all this behaviour. X11 is the 11th version of the server and protocols. But X was also first created in 1984, and X11 since around 1987. Small changes have been made to X11 over the years but the last was in 2012.

Which makes it a very old protocol - and one which is showing its age. Advances in hardware since then and the way we use devices have left a lot to be desired in the protocol and while it has adapted a bit to keep up with modern tech it has not done so in the best of ways. I also believe its codebase is quite complex and hard to work with so changes are hard to do.

Thus is has quite a lot of limitations that modern systems are rubbing up against - for instance it does not really support multi cursors or input that is not a mouse and keyboard. So things like touch screens or pen/tablets tend to emulate a mouse and thus affect the only pointer X has. It is also not great at touchpads and things like touch pad gestures - while they do work, they are often clunky or not as flexible as some applications need.

It is also very insecure and has no real security measures in place - any GUI application has far more access to the system and input then it really requires. For instance; any application can screen grab the screen at any point in time - not something you really want when you have a banking web page open.

Wayland is basically a new set of protocols that takes more modern hardware and security practices in mind. It does the same fundamental job as X11, but without the same limitations X11 has and to fix a lot of the security issues with X.

One big difference with X though is that Wayland is just a protocol, and not a protocol and server like X. Instead it shifts the responsibilities of the X server into the window manager/compositor (which used to manage window placement and window borders as well as global effects such as any animations or transparency). It also has better controls over things like screen grabs so not every application can just grab a screen shot at once or register global shortcut keys or various things like that. Which for a while was a problem as screen sharing applications or even screenshot tools did not work - but over time these limitations have been added back in more secure ways than how X11 did them.

[-] Zoidsberg@lemmy.ca 14 points 10 months ago

Does that mean that every application will need to be updated to work with Wayland?

[-] NateSwift@lemmy.world 22 points 10 months ago

In theory yes. In practice most X11 applications can be ran using Xwayland as a compatibility layer

[-] nous@programming.dev 17 points 10 months ago

Additionally any application using a GUI toolkit (like kde, qt or gtk etc) only needs to to update to a version that has native Wayland support. Which means most applications already support it. At least if they don't use any X11 APIs directly (which is not that common).

[-] aBundleOfFerrets@sh.itjust.works 1 points 10 months ago

Not really a GUI toolkit but many many games use SDL and they also gain wayland support with a library update

[-] OmnipotentEntity@beehaw.org 7 points 10 months ago

Yes, nominally, but there is a layer called XWayland to support backwards compatibility, so it's not really a concern.

[-] MonkderZweite@feddit.ch -2 points 10 months ago* (last edited 10 months ago)

Wayland was initially invented for kiosk applications. Then the idea popped up, why not use it for Display Managers too? (graphical login window needs to display somehow) And then the whole thing blew up as a universal solution it was not designed for. So, Wayland is not ideal either.

this post was submitted on 14 Jan 2024
186 points (92.7% liked)

Linux

48366 readers
1630 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS