|
|
Subscribe / Log in / New account

Ranting on the X protocol

Ranting on the X protocol

Posted Jun 2, 2010 14:17 UTC (Wed) by bronson (subscriber, #4806)
In reply to: Ranting on the X protocol by jg
Parent article: Danjou: Thoughts and rambling on the X protocol

Hi Jim. Agreed, X11 has allowed an incredible amount of change. That's a definitely success.

But I disagree with you in one place: nobody cares anymore about X's network transparency! Even today setting up xauth is so unreliable and enough of a hassle that everybody I know just fires up VNC instead. Can't wait for spice.

With X, if there's a network blip, your apps all hang. With VNC, you can leave the office now and access your apps from the coffee shop 6 hours later. No forethought needed.

VNC feels MUCH faster, especially over today's 1Mbit 3G links. Remote X has weird terminology (which is the client and which is the server), and a weird auth setup that nobody wants to understand anymore.

Sample size of one, don't shoot the messenger. All I'm saying is this: as long as VNC and Spice are easier to use, feel faster, and are more reliable out of the box, very few end users are going to give a hoot about X's network transparency. I think the KDE and Gnome guys can be forgiven for chucking a poorly-implemented, seldom-used feature out the window.


to post comments

Ranting on the X protocol

Posted Jun 2, 2010 15:25 UTC (Wed) by nybble41 (subscriber, #55106) [Link] (5 responses)

"Remote X has weird terminology"

It's not "weird terminology". The program which starts first, ends last, and provides access to system resources (display, keyboard, mouse) is the server. The shorter-lived applications which connect to the server to make use of these shared resources are the clients. This is perfectly consistent with every other client/server arrangement out there.

What throws people is that we're used to thinking of servers as a particular type of *hardware*, steadily ticking away the CPU-hours in some climate-controlled back room, out of sight, whereas "clients" are the visible workstation PCs at everyone's desk. However, the X client/server terminology is perfectly reasonable from a *software* point-of-view, and X is software, not hardware.

Anyway, so long as X uses Unix-domain network sockets for IPC--a reasonable choice, even for purely local apps--it gets network transparency practically for free. I'd probably drop support for xauth and remote display managers in favor of SSH forwarding and Avahi service discovery, though, and extend SSH to forward D-Bus and PulseAudio by default along with X.

Ranting on the X protocol

Posted Jun 2, 2010 15:54 UTC (Wed) by mgedmin (subscriber, #34497) [Link] (2 responses)

PulseAudio is already transparently forwarded over ssh X11 forwarding, which I accidentally discovered when I ran mplayer over an ssh'ed connection and heard the music over my local speakers. I'm not sure how that works (a property on the X root window telling Pulse clients where to find the right Pulse server?), especially since it doesn't work for me any more when I try it _now_.

Ranting on the X protocol

Posted Jun 2, 2010 18:33 UTC (Wed) by njs (subscriber, #40338) [Link]

IIRC, there's a property on the X root window giving the *absolute network address* of the Pulse server. ssh isn't forwarding Pulse; it's just that if you're ssh'ing within a local, unfirewalled, network, then apps whose X stuff is forwarded through ssh will be able to make an additional direct connection to the pulseaudio server.

Ranting on the X protocol

Posted Jun 2, 2010 18:36 UTC (Wed) by nybble41 (subscriber, #55106) [Link]

PulseAudio uses an X11 property to tell clients where the PA server is, so clients will automatically connect (directly, not via SSH) to the PA server started under the same X11 session. However, the PA server isn't necessarily persistent across the entire session, or started automatically on login, so what happens if the remote client starts PulseAudio on its own? (That may be your problem--the first time you already had PA running locally, and later it was started on the remote system by the client app.)

I think it would be better to forward the PA connections via SSH, as with X11 tunneling, so that no one can eavesdrop and there are no PA-specific issues with firewalls, etc. There is a PULSE_SERVER environment variable one can set to override the X11 property.

Ranting on the X protocol

Posted Jun 2, 2010 20:16 UTC (Wed) by RCL (guest, #63264) [Link] (1 responses)

It's weird design choice, in the first place. One that makes it hard to have persistent sessions or allow the same application to be broadcasted to multiple erm... "servers".

Ranting on the X protocol

Posted Jun 3, 2010 10:44 UTC (Thu) by nix (subscriber, #2304) [Link]

The fact that servers hold data on behalf of clients, and that clients often do not bother holding a copy of this themselves or responding to a disconnection by reconnecting and restoring the server state, makes it essentially impossible to implement persistent sessions in any case. (You can do it by interposing a persistent proxying X server that does not die, but that's not solving the problem, just pushing it onto another thing that must be persistent.)

I'm not sure how you could fix this without dropping *all* server-side state, which would be a performance catastrophe.

Ranting on the X protocol

Posted Jun 2, 2010 16:12 UTC (Wed) by martinfick (subscriber, #4455) [Link] (6 responses)

"nobody cares anymore about X's network transparency!"

Perhaps you don't, but I do (and I suspect that many others still do too), so please don't speak for others. Yes, many people have cell phones, but you might be shocked to find out that land lines are still very common also. :)

Yes, it is a pain to re-enable kdm to allow remote logins anytime I upgrade it, (for some reason, the old settings are never enough), but that is hardly X's fault, and surely it doesn't make me want to throw out the baby...

As for VNC, it never seems to work as well for me, last time I tried it, youtube videos were all blue... If it works for you, I am happy and I wouldn't want (or advocate) to take it away from you, I hope you could see it in you to return that sentiment.

Ranting on the X protocol

Posted Jun 2, 2010 16:21 UTC (Wed) by rsidd (subscriber, #2582) [Link] (5 responses)

As for VNC, it never seems to work as well for me, last time I tried it, youtube videos were all blue...

And youtube video works over X11 forwarding? How about the audio, over either X11 or VNC?

VNC works well for the cases it's meant for, and on slow links it's much faster than X11 forwarding.

Ranting on the X protocol

Posted Jun 2, 2010 16:37 UTC (Wed) by martinfick (subscriber, #4455) [Link]

I am not sure if your questions were aimed at me? What do you mean by X11 forwarding? (via ssh?) Via normal X11 (non ssh) the videos are just fine (not blue). I don't work remotely over slow links, I use X on my home LAN only. As for sound, I don't use any X11 or VNC features for it, I just use PA and multicast so I can hear what I want anywhere on my LAN, works fine. Again, I am not criticizing VNC, I think it is great too, but it is different than X and not a good substitute in all use cases. And, as with most software, it helps to have multiple solutions available since sometimes they don't all work perfectly.

Ranting on the X protocol

Posted Jun 2, 2010 21:36 UTC (Wed) by daglwn (guest, #65432) [Link] (2 responses)

VNC works well for the cases it's meant for, and on slow links it's much faster than X11 forwarding.

That's not been my experience at all. VNC has always been slower than just running windowed emacs over the X protocol, for example.

Ranting on the X protocol

Posted Jun 8, 2010 20:23 UTC (Tue) by nix (subscriber, #2304) [Link] (1 responses)

Yes, with things that don't use Render much, or which render mostly monocoloured backgrounds (like most text editors), VNC's simpleminded 'just transmit giant bitmaps' scheme is intolerably inefficient and laggy. It's laggy even over a gigabit network... tightvnc makes it a bit better, but not much.

Apps that render backgrounds which consist of repeating elements can use Render to transmit those elements only once.

With things that have heavily coloured/textured backgrounds which are different at every point, maybe, just maybe both would be equally efficient... although surely you'd send that to the X server as a pixmap.

Can anyone think of *any* application (other than e.g. talking to Windows systems on the far side, or handling disconnected operation, neither of which X was designed for) for which VNC is preferable to X? I can't think of any.

Ranting on the X protocol

Posted Jun 8, 2010 22:15 UTC (Tue) by rsidd (subscriber, #2582) [Link]

Can anyone think of *any* application (other than e.g. talking to Windows systems on the far side, or handling disconnected operation, neither of which X was designed for) for which VNC is preferable to X? I can't think of any.

Here's one: a slow network connection with latency (eg, connecting to office from my home). VNC is usable, X11 forwarding is not. I am willing to believe that X11 beats VNC on gigabit networks. And, of course, if the connection goes down you lose nothing (except time). You seem to be saying X was designed for LANs (where disconnected operation is relatively uncommon) and not wider networks. If so, that's another argument for VNC.

Ranting on the X protocol

Posted Jun 3, 2010 0:12 UTC (Thu) by agriffis (guest, #10251) [Link]

Regarding youtube, it works fine over X11 on a gigabit LAN. But a better example is mplayer which runs 720p video dandily using Xvideo over the network, and audio syncs well using pulseaudio. I haven't tried VNC and don't know how it would do for that, but I run thin clients upstairs to a server in the basement and the system works great, with one notable exception: mythtv-frontend. Unfortunately the only way to make this work on the thin client is to run it locally, but the thin client doesn't have the horsepower to do so.

Ranting on the X protocol

Posted Jun 2, 2010 16:51 UTC (Wed) by jg (guest, #17537) [Link] (6 responses)

Exactly my point: there are better, more robust ways to do network transparency than with the X protocol.

However, it is also the case that toolkits/applications should be involved in a deep way. If I want to run an app on a phone display, it should in fact be a different UI than when I'm on the HD screen across the room.

Our current architecture is broken, in ways that are not recoverable. This is why I said I'd do it in a radically different way, if I got the chance to do it again.

Every other system out there is similarly (or worse) broken, btw, there is nothing about this rant that is X specific.
- Jim

Ranting on the X protocol

Posted Jun 2, 2010 23:47 UTC (Wed) by obi (guest, #5784) [Link] (5 responses)

If you want a different UI depending on the hardware it's displayed on (phone vs HD screen) you'd need the toolkit's involvement. Or do you mean a Fresco-style toolkit-on-the-server-side? Now you got me curious.

Ranting on the X protocol

Posted Jun 3, 2010 0:18 UTC (Thu) by jg (guest, #17537) [Link] (4 responses)

Heh. At the moment, the UI is pretty tied up in the application's toolkit (for most applications).

NeWS attempted the opposite: load the UI into the display server, and send messages. In some ways, they were right; except the language chosen was horrid (postscript), and interesting extensions almost always still would have required modifications to that engine.

I think we (both NeWS and X) were wrong and the rendering for a UI should be in an entirely separate (set of) address spaces; in fact, I think for most applications, that they are currently written at too low level a level of abstraction.

The extra address space transitions this would imply is just not important any more, and would enable lots of interesting scalability and other enhancements.

So, think of a system in which identity is a first class citizen along with security (as occurs in CCNx, out of the box), based around the idea of the fundamental operation just being compositing of pixels, and multiple engines that might generate these pixels (which might even be VM's, running on the same iron, but with possibly very different graphics models).

And it would be pull, rather than push, and time based. Everything would be named (potentially globally).

A fundamentally different sort of architecture.

As I said, I've been stewing about this for much of the last 10 years, and it is seeing CCNx that has caused the fog to (partially) clear. I'm trying to clarify these ideas for a workshop later this summer; until then, this is as far as I will go.
- Jim

Ranting on the X protocol

Posted Jun 3, 2010 14:41 UTC (Thu) by obi (guest, #5784) [Link] (2 responses)

Thanks for the reference to CCNx - I can't believe I missed that. I've been messing about and doing some experiments based on the exact same premises, and coming to the exact same conclusions - trust/identity with immutable data, pervasive caching/dissemination, etc. I think the zeitgeist is clearly moving in that direction, as projects like Freenet, Git, Bittorrent, Allmydata etc all demonstrate. In the end I'd like to see us get to nearly stateless computing, where the data is everywhere (preferably local), and your hardware is just a window on it.

I think I can guess some aspects of the graphics architecture you have in mind, based on what you imply. I'd be very interested to hear more about it though - guess I'll have to wait until summer.

CCNx is important work...

Posted Jun 3, 2010 20:57 UTC (Thu) by jg (guest, #17537) [Link]

CCNx has not seen much notice; it is a still reasonably early research with much to work out yet.

Conceptually, however, it and some similar projects elsewhere I believe will change how we think about communications as much as TCP/IP (and packet networking in general) changed the view from the world of telephony.

It's view (which I still am working to get my head around), is a very different view of the world; there is some other work that has also affected my world view deeply (in particular the T-Time view found in Croquet derived from Dave Reed's thesis of so many years ago).

It is time for something *really* new....
- Jim

Ranting on the X protocol

Posted Jun 3, 2010 21:35 UTC (Thu) by dmk (guest, #50141) [Link]

"In the end I'd like to see us get to nearly stateless computing, where the data is everywhere (preferably local), and your hardware is just a window on it."

I like that. Kinda like the Matrix. :)

Ranting on the X protocol

Posted Jun 6, 2010 16:02 UTC (Sun) by ortalo (guest, #4654) [Link]

Really sounds mind-raising. Hope to hear again from you on this topic in a not-too-distant future.

Ranting on the X protocol

Posted Jun 3, 2010 14:30 UTC (Thu) by mebourne (guest, #50785) [Link]

"nobody cares anymore about X's network transparency!" - I care deeply, I use it extensively to earn a living.

"Even today setting up xauth is so unreliable and enough of a hassle that everybody I know just fires up VNC instead" - ssh solved the xauth problem back in the nineties, you don't even have to know it's there.

"VNC feels MUCH faster, especially over today's 1Mbit 3G links" - native X11 is unusable on high latency links but then VNC sucks on high latency links too. VNC also gives an unpleasant user experience and forces you to remote a whole desktop preventing any useful integration with your local system. X11 makes remote programs behave like local ones and lets you use them with all the same convenience.

As to solving the latency issue just use XPRA (http://en.wikipedia.org/wiki/Xpra). This removes round-trips in the X11 protocol and makes very high latency links usable - more useable than any other technology I've seen. It has the added bonus of surviving disconnections, allowing you to connect from somewhere else, all the same stuff you get from VNC. It's like having "screen" for X. It's as easy to use as VNC but all the advantages of normal remote X.

I use XPRA over a 270ms round-trip link for all my work apps all day every day and it's the only useable solution.

Ranting on the X protocol

Posted Jun 6, 2010 19:58 UTC (Sun) by Wol (subscriber, #4433) [Link]

As someone who knows nothing whatsoever about VNC (other than it's similar to X), but who currently uses one PC as an X-term into another all the time, you have one user here to whom X's network transparency is rather important ...

Cheers,
Wol

Ranting on the X protocol

Posted Jun 8, 2010 9:02 UTC (Tue) by jschrod (subscriber, #1646) [Link]

VNC a replacement for remote X? You're joking, right?

Maybe for people who just want to do a short action on a remote desktop, and don't care for consistent keyboard handling or working X selections. But for people like me who have X applications open from 5-10 remote systems all the time, network transparency on the application level (and not on the desktop level!) is one of THE reasons to use X.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds