8 ms·
The comment about how X is really just a distributed database system with occasional visual side effects that could be reduced down to 10 or so API calls gives
by jandrese 9y ago
The comment about how X is really just a distributed database system with occasional visual side effects that could be reduced down to 10 or so API calls gives us a glimpse as to what life could have been.
It's a shame that all of the X replacements on the horizon also ditch the network transparency part, even though that's been a killer feature for me. I hate how much of a hack Remote Desktop is on Windows machines.
- theoh 9y agoIn the old days it was convenient to be able to run a SunOS binary on a remote server and display on a Linux machine -- but this can't be as common today. The way X clients can be forwarded over SSH implies that network transparency doesn't need to be built in to the window system, there just needs to be a "seam" at which it can be interposed. Obviously any kind of direct access to graphics hardware makes this impractical. Plan 9's window system uses the 9p file system protocol to cross the network; another Bell Labs trick (used in Rob Pike's Sam editor) is for the app to be split into two parts with their own internal interface. They can run on different hosts. The internal protocol/interface can be tailored to the app (and can potentially be very simple and/or efficient).
- mst 9y agoOnce you've created a seam (possibly a unix socket, many of my designs rely on those) exposing the same socket over TCP becomes relatively trivial and now you effectively have network transparency anyway (see also spiped). But, yeah, so long as the client is a separate process, getting it transited over the network can be done separately.
- slobotron 9y agoHeh, reminded me of running Internet Explorer and Outlook Express on a university Solaris box and had it displaying at home on an OpenBSD laptop... (yes, IE & Outlook had UNIX versions: https://en.wikipedia.org/wiki/Internet_Explorer_for_UNIX https://en.wikipedia.org/wiki/Internet_Explorer_for_UNIX)
- JoshTriplett 9y ago> It's a shame that all of the X replacements on the horizon also ditch the network transparency part, even though that's been a killer feature for me. I've used ssh -X many times in my life, but at the same time, I understand why network transparency doesn't make as much sense anymore. Classically, the X protocol kept a huge amount of state on the server, and clients would just send small requests to manipulate that data. Drawing would take place server-side, and it was relatively simple drawing at that, since UI needs were fairly modest. Text rendering occurred on the server with small strings sent from the client. And overall, it made sense to send a small amount of data to produce a large amount of graphics. These days, however, rendering occurs almost exclusively on a combination of the client and the GPU. Everything takes place via large memory buffers, and compositing. And pushing those over the wire doesn't work nearly as well; if you're going to do that, you need protocols designed for it, with compression and delta-encoding, much like modern video codecs (but optimized for remote-desktop). So I think it makes sense that network transparency is being rethought, in favor of protocols that look a lot more like remote-video (and remote-audio).
- throwaway2048 9y agohttps://www.xpra.org/ https://www.xpra.org/ is an example of the video-codec style approach, it is per application/window like X11 and it is extremely usable even over very poor network conditions, and handles 60fps audio and video brilliantly. Well worth checking out.
- philsnow 9y agoxpra is my favored tool out of plain X forwarding / vnc / (free)nx / x2go / etc, but one issue I have with it (at least last time I used it) is that it requires the version string to be identical on both client and server. This, combined with it being written in python, means that every distro packages it differently, has a different version number, and if you want to just clone it and run it yourself, now you have to deal with python / virtualenv / whatever hell. Other than that, it's pretty great.
- DonHopkins 9y agoIf you believe the README.txt files of downloads from The Pirate Bay, there exist some amazing video codecs that are so new and advanced that they can actually play episodes of Rick and Morty that haven't even been released yet! It's almost as good as inter-dimensional cable TV. And they are totally free: you just have to download and install some binary codecs from some Russian web site before watching the video.
- CJefferson 9y agoI prefer every other OSes remote desktop, because I can detach and reattach them in different computers. Rightly or wrongly, modern GUIs tend to be sufficiently graphical that X turns into effectively sending bitmaps anyway, so in my experience a lightly compressed VNC is more responsive. It is nice that in X individual windows can live independently, but adding that to your windowing manager feels like less work, and is how for example windows works nowadays (don't know other windowing systems well enough).
- u801e 9y ago> I prefer every other OSes remote desktop, because I can detach and reattach them in different computers. You can do that on various Linux distros with xpra [1]. [1] https://www.xpra.org/ https://www.xpra.org/
- digi_owl 9y agoAnd before that there were always xmove... https://en.wikipedia.org/wiki/Xmove https://en.wikipedia.org/wiki/Xmove
- DonHopkins 9y agoI made the X11 SimCity code that updates the small map (which usually has only a few pixels changed, but sometimes has many pixels changed) compare the "before" and "after" images and count the differences, and if there were few enough differences, it would sort the changed pixels by color, then send batches of XDrawPoints of each color. In X11 it is just as expensive to change the foreground color as to draw one dot (since all the overhead is sending the command), but you could efficiently draw a lot of dots of the same color with XDrawPoints, so it was worth it to sort the pixels by color and then draw them in a few same-colored batches, instead of switching colors between each pixel you draw. I disabled that crazy code for the OLPC port since it was always running locally and XPutImage would always always use the shared memory extension, but in the days when you wanted to run remotely over a slow network, or the local server didn't support the shared memory extension, it was well worth doing all the work of comparing and sorting individual pixels to incrementally update the map! https://github.com/SimHacker/micropolis/blob/master/micropolis-activity/src/sim/w_map.c#L466 https://github.com/SimHacker/micropolis/blob/master/micropol... (I'm sure that code used to work on old 8 bit displays, but for some reason I never bothered to figure out, it was buggy on the OLPC's 24 bit visual, so I #if'ed it out of its misery. That's X11 for you.) https://github.com/SimHacker/micropolis/blob/master/micropolis-activity/src/sim/w_map.c#L543 https://github.com/SimHacker/micropolis/blob/master/micropol...
- adrianratnapala 9y agoIt's a shame that all of the X replacements on the horizon also ditch the network transparency part, even though that's been a killer feature for me. Don't worry, in time everything will be re-invented on the web. With WebGL, the browser becomes just like an X server, only with a far richer feature set for malware authors.
- npsimons 9y ago> I hate how much of a hack Remote Desktop is on Windows machines. People just don't seem to get this. If I can't alt-tab between windows, remote GUI apps are next to useless for me. It breaks my workflow. I hit this speebump all the time when working with VMs and RDP.