4 ms·
"But, what if we have a protocol where you simply open a network socket and write some messages on it that says 'write this text hear', 'draw a line from X to Y
by md8z 5y ago
"But, what if we have a protocol where you simply open a network socket and write some messages on it that says 'write this text hear', 'draw a line from X to Y'? Well, that is how X clients work."
I mean, that is also how the Web Canvas API works. If you want to control this with some messages on a TCP-ish socket then you can use websockets. The web browser already appears to be a superset of all the networked functionality of X.
"One of the main advantages of Linux/UNIX systems in the past was that X was a userspace application"
Wayland still is a userspace application too. The protocol itself is what is at a lower level of userspace than X was, of course the compositor can also implement high level features as it sees fit.
- alerighi 5y ago> I mean, that is also how the Web Canvas API works. If you want to control this with some messages on a TCP-ish socket then you can use websockets. The web browser already appears to be a superset of all the networked functionality of X. Yes, in a very inefficient way, you end up using 1Gb of RAM to do something that could have been done with 1Mb. Not important for desktops, but for embedded applications? > Wayland still is a userspace application too. The protocol itself is what is at a lower level of userspace than X was, of course the compositor can also implement high level features as it sees fit. Wayland is based on KMS that indeed is a graphic implementation in the kernel itself.
- md8z 5y agoI'm not sure what you mean 1GB. An empty tab on Chromium seems to take about 30MB. Minimal "Hello world" GTK and Qt programs are around the same size. Modern Xorg is also using the KMS API. If you don't want any fancy features and just want to draw some lines then you probably want to skip Xorg and Wayland altogether and use KMS directly.