Announcement

Collapse
No announcement yet.

SDL3 Will Keep Wayland Default At Least For The Time Being

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Originally posted by mSparks View Post
    linux HPC GUI is pretty much 100% of Linux use
    Not really, most wide spread Linux use is embedded, appliances, etc.
    HPC is also a strong domain, of course, almost exclusively Linux by now.

    Originally posted by mSparks View Post
    SSH is all tcp sockets
    Exactly, it handles the TCP bit so that X11 does not have to and only works on local unix domain sockets.

    On the sshd side the incoming connection creates such a socket and points the DISPLAY environment to it, so any client will connect as if that were the actual X server.
    On the side that initiated the SSH connection, the ssh process connects the the unix domain socket its DISPLAY points to.

    So from the point of view of the X programs (client and server) there is no network involved.
    Neatly avoiding any issues X11's network capability might have had.

    Waypipe is essentially doing the same for tunneling Wayland through SSH

    Comment


    • #62
      Originally posted by anda_skoa View Post
      Exactly, it handles the TCP bit so that X11 does not have to
      X11 doesn't "deal with" anything, X11 is just a data stream format definition (generally referred to as a "protocol", although that term has less meaning these days) that allows you to send interactive GUI over any data stream.
      In contrast to wayland, which is defined purely as linux kernel function calls.
      Originally posted by anda_skoa View Post
      actual X server.
      an x-server is what handles X11, wayland calls what X-Server does "the wayland protocol". (yes, that is SNAFU, like most of wayland tbh)

      Originally posted by anda_skoa View Post
      Not really, most wide spread Linux use is embedded, appliances, etc.
      wont really disagree with that, I was thinking more in terms of linux use by those employing large numbers of people for Linux dev like microsoft/google/amazon etc.
      Of course Android is by far the most popular Linux distribution, and that doesn't use X11 or wayland.

      Originally posted by anda_skoa View Post

      Waypipe is essentially doing the same for tunneling Wayland through SSH
      waypipe is basically a version 0.8 of X11, feature equivalence circa 1965......
      Last edited by mSparks; 29 March 2024, 07:01 PM.

      Comment


      • #63
        Originally posted by mrg666 View Post

        What are you? Get away from me, moron! I am not buying.
        the only way to make this question funnier is if you were getting paid by redhat to pose such deeply insightful and important questions with such eloquence and intelligence.

        Comment


        • #64
          Originally posted by mSparks View Post
          X11 doesn't "deal with" anything, X11 is just a data stream format definition (generally referred to as a "protocol"
          Sure, but in this context I was obviously referring to the implementation of said protocol in the involved programs.
          The X11 client and the X11 server only deal with a local unix domain socket and don't "see" any network connection.
          The SSH client and server handle this for them.

          Theoretically the X11 client and server could do the network communication themselves, but that is rarely (if ever) used.

          Originally posted by mSparks View Post
          In contrast to wayland, which is defined purely as linux kernel function calls.
          No, Wayland is very similar and also based on messages being sent through a unix domain socket.

          Like with X11 there are several levels or layers to the protocol definition.

          On the lower level both define what is often referred to as a "wire format", essentially a definition of how to spit the byte stream into individual messages.
          On top of that there are definition on how each message is to be interpreted, e.g. as a call to a function, a result of such call or an event.
          And on top of that what the two programs expect each other to do.

          In both cases the primary transport mechanism is a so called Unix Domain Socket.
          A bi-directional bytes stream facility that is in some aspects comparable to a network communication (TCP/IP socket) but local to the machine (and usually also to a specific user on that machine).


          Comment


          • #65
            Originally posted by mSparks View Post

            the only way to make this question funnier is if you were getting paid by redhat to pose such deeply insightful and important questions with such eloquence and intelligence.
            Who pays whom is your business since nobody pays you, I guess. Just because someone on the internet says so, Red Hat is bad, huh? I won't even ask why. See below.


            Comment


            • #66
              Originally posted by anda_skoa View Post

              No, Wayland is very similar and also based on messages being sent through a unix domain socket.

              where are the byte order definitions for wayland defined?

              Comment


              • #67
                Originally posted by mSparks View Post
                where are the byte order definitions for wayland defined?
                The wire format is part of Chapter 4 of the Wayland specification.

                Comment


                • #68
                  Originally posted by anda_skoa View Post

                  The wire format is part of Chapter 4 of the Wayland specification.
                  by "define" you mean explicitly states it does not define a byte order

                  "The protocol does not specify the exact position of the ancillary data in the stream, except that the order of file descriptors is the same as the order of messages and fd arguments within messages on the wire.
                  In particular, it means that any byte of the stream, even the message header, may carry the ancillary data with file descriptors."

                  because it isnt defined as a protocol like http, ftp, x11 or any of the other protocols proper.

                  its actually defined by a set of linux syscalls with no equivelent in any other OS, and its "wire protocol" is just what domain sockets do with them.

                  Comment


                  • #69
                    Originally posted by mSparks View Post
                    by "define" you mean explicitly states it does not define a byte order
                    It does. Bytes are in the host's byte order.
                    It also specifies the message format.

                    Originally posted by mSparks View Post
                    "The protocol does not specify the exact position of the ancillary data in the stream, except that the order of file descriptors is the same as the order of messages and fd arguments within messages on the wire.
                    That applies only to the file descriptors as they are sent in parallel to the message.
                    The corresponding message is transmitted as defined by the specification.

                    The specification explains that quite well for people who understand this special capability of Unix domain sockets.

                    Originally posted by mSparks View Post
                    In particular, it means that any byte of the stream, even the message header, may carry the ancillary data with file descriptors."
                    You can think of this as second channel.
                    The file descriptor could arrive anytime during which message data arrives on the main channel.

                    The receiving program will still have to receive the full message to understand the context for the file descriptor.

                    For example when a client creates a shared memory buffer it sends a wl_shm::craete_shm_pool message that contains the ID for the buffer (for referencing it later), information about the available size and a file descriptor pointing to the actual memory.

                    The first two items are part of the message on the main channel, the number of bytes and order specified by the respective protocol section.
                    The file descriptor is sent along side the message and the compositor only knows that it is for a shared memory buffer because the message said so.

                    Originally posted by mSparks View Post
                    because it isnt defined as a protocol like http, ftp, x11 or any of the other protocols proper.
                    Yes it is. The protocol specification is quite clear on that.

                    Originally posted by mSparks View Post
                    its actually defined by a set of linux syscalls with no equivelent in any other OS, and its "wire protocol" is just what domain sockets do with them.
                    Unix domain sockets are not Linux specific, all Unix variants and related OS can do them.
                    Even macOS can do them.

                    Windows has a facility called Named Pipes which is somewhat similar.

                    From an application's point of view the are just a way two-way data stream channel.

                    Most widely used on a desktop system for X11 or Wayland for displaying and D-Bus for interaction with services.

                    It can also be used for databases that should not be reachable from outside the system.
                    For MySQL the server has a command line option called "--socket" to specify the "address" of such a socket.

                    They are very convenient as they can be access restricted like files, allow for very little latency and have the capability to also transport file descriptors as discussed above.

                    The two programs communicating through them still need a shared understanding of the data that is being transmitted.
                    Hence the various protocol definitions which are usually accompanied by a library (or set of libraries) that implement them, e.g. libxcb, libwayland, libdbus

                    Comment


                    • #70
                      Originally posted by anda_skoa View Post
                      Bytes are in the host's byte order.
                      That isn't what is meant by defining a protocol.
                      e.g.


                      Wayland doesn't have ANYTHING like that, primarily because it works exclusively with file descriptors retrieved from syscalls that only have localhost context.

                      (there is zero benefit it doing it that way, other than doing a "proper job" of defining a protocol as complex as GUI is a hard problem, which is why X11, despite all its flaws, still owns the server space)


                      Last edited by mSparks; 30 March 2024, 08:05 PM.

                      Comment

                      Working...
                      X