points by nsajko 6 years ago

Wayland is broken by design (or, as another commenter says, "lacking on a conceptual level") and NOT A REPLACEMENT for X Windows.

Wayland has a bonkers security (theatre) model based around protecting from untrusted processes (graphical applications) connected to the compositor. (If you must give untrusted code a process on your machine, the correct solution is to give it its own Unix user and run an X Windows server owned by the same user.)

One consequence is that screenshots/screencasts do not exist on Wayland, applications can only see their own windows. Also, quoting Red Hat: "Furthermore, there isn’t a standard API for getting screen shots from Wayland. It’s dependent on what compositor (window manager/shell) the user is running, and if they implemented a proprietary API to do so."

EDIT: Other stuff that you can not do with Wayland and is justified by their "security" model is injection of input events and reading other applications input (think xdotool, autohotkey; this is great when you want more control of your graphical user interface system).

qcowhwcugwcgoiu 6 years ago

What you describe as broken by design in terms of security is in fact its primary advantage from my perspective:

With the security nightmare that is modern web browsers I do not want any of them which runs on my machine to be able to access a single bit of more data than which is necessary.

Firejail helps a lot for this purpose, but fixing the browser to not be able to spy on other X applications requires sticking them into a Xpra sandbox, which greatly intereferes with performance and is a hell of an ugly hack (it's like running a local VNC server and connecting locally to it).

Putting software into different user accounts isn't a solution either because the usability of that is well, unusable.

  • nsajko 6 years ago

    Use different users and/or virtual machines if you want security.

    BTW, Firejail is also shit, it had some stupid design decisions and security bugs. And it basically relies on Userspace namespaces which are or were an experimental/unsecure feature in Linux.

    Wayland's security model is bonkers because the attack surface it implies is just too great.

    BTW, Is useradd not usable for you?

    • qcowhwcugwcgoiu 6 years ago

      > Use different users and/or virtual machines if you want security.

      The Internet is so important that for daily computer usage I, and probably everyone else, have a browser open at basically any point in time.

      So do you want me to switch users between the $browser_user and $main_user every 5 minutes I need to do something outside of the browser?

      • nsajko 6 years ago

        I just run chromium as my main user (but usually with a temporary scripted --user-data-dir and HOME environment variable), because it is relatively secure.

        And switching Linux consoles/X servers is just two key presses anyway.

        • nsajko 6 years ago

          Correction: usually it is three key presses: Control, Alt, F3; for example.

    • qcowhwcugwcgoiu 6 years ago

      > and/or virtual machines if you want security.

      ... and w.r.t. that: The modern JavaScript jungle that is the Internet is slow enough already. And we're not even getting started with watching videos here...

ubercow13 6 years ago

I think this is false, screenshots and screen recording are both possible with sway for example afaik

  • _mdpn 6 years ago

    >"Furthermore, there isn’t a standard API for getting screen shots from Wayland. It’s dependent on what compositor (window manager/shell) the user is running, and if they implemented a proprietary API to do so."

    Sway's compositor implements a way to do this as only it has access to all of the display data, but there is no standard way outside of the compositor to do this under Wayland.

    The consequence of this is that every program that wants to do a screencast (Skype, Discord, etc) will have to integrate with specific compositors to do this - there is no standard way to do this across all compositors like under X.