Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3567

Graphical Environments & Desktops • Do Wayland Programs Require a Wayland DE?

$
0
0
Today aren't at least 99% of the windowing clients on the same machine as the server?
Perhaps, thin-clients are still a thing. X was designed with that kind of environment ("application server" mainframe with many remote terminals) in mind, wayland was not... Because apparently the only use-case that matters these days is laptops and tablets. :roll:

For example, would a remote terminal session over SSH use the X (or wayland) protocol as a remote client?
I think not and I think that the local ssh client would use the X protocol locally to manage the terminal window locally.
Assuming we're still talking about remote graphics protocols, X is trivial to tunnel over SSH and allows you to run any graphical application (client) on a remote machine and display it's window in your local Xserver, seamlessly integrated into your desktop.
e.g. 'ssh -X user@server gedit' in a terminal would spawn a new gedit window on your desktop (with @server added to the window title), where the 'gedit' application is running on the remote server and displayed locally.

Draw calls/primitives are transmitted over the network from the remote application to your local Xserver, which renders the result on the local graphics hardware. Much the same for input event handling, but in reverse.
IOW, the local Xserver (or more accurately the window manager running on the local xserver) manages the window, the remote application (client) tells it how to draw the contents and receives input events.

The main caveat is that this approach kinda sucks for hardware accelerated rendering (where it's much faster to render on the server and send a compressed image than it is to send every draw command), but that didn't exist when the protocol was conceived.
It also places more trust in the client application (because that was intended to be running on a trusted mainframe) than the (user-controlled) xserver, which is the reverse of modern expectations and the source of much whining about X security.

Wayland requires additional software to do the same tricks (e.g. waypipe) and functions more like VNC, i.e the complete window content is sent as an image rather than a sequence of drawing primitives.


A traditional CLI login over SSH (in case that's what you're talking about) doesn't really have anything to do with X or wayland, it's just a normal, local window running a terminal emulator (or could be a real VT for that matter) and everything else is SSH piping plain text around.

I see that Wayland keeps the concept of a protocol but is local (as opposed to remote over a network) and allows a more direct graphics control.
Wayland is very different, there is no real concept of client-server or drawing primitives. Rather the compositor gives each application a surface to draw onto however it likes, then composes those into a complete desktop scene (gross oversimplification, but you get the idea).

Statistics: Posted by steve_v — 2024-11-21 09:50 — Replies 8 — Views 193



Viewing all articles
Browse latest Browse all 3567

Trending Articles