0

I was reading https://security.stackexchange.com/questions/120612/x-windows-security-vnc-and-x-server-vs-xpra. In the following scenarios, what protocols are encapsulated i.e. above what protocols?

  1. When using ssh -X, is X protocol right above SSH protocol (which is then right above TCP protocol)? Does x client run on remote host and x server run on local host?

  2. When using VNC without SSH, is X protocol right above VNC (i.e. RFB) protocol, which is then right above TCP protocol? Or do both x client and x server run on the remote host, and VNC protocol only transfer the snapshot of the remote desktop to the local host?

    When using VNC with SSH, is X protocol right above VNC (i.e. RFB) protocol, which is then right above SSH protocol (which is then right above TCP protocol)?

  3. When using xpra without SSH, is X protocol right above TCP protocol? Does x client run on remote host and x server run on local host?

    xpra can also forward the whole desktop, does it work like VNC protocol in that both X client and X server run on the remote host?

    When using xpra with SSH, is X protocol right above SSH protocol (which is then right above TCP protocol)?

  4. Is the difference between xpra and VNC just that xpra implements exactly X protocol, while VNC implements exactly VNC protocol and needs to work with external X protocol? What is really the benefit of having VNC protocol then?

Thanks.

2
  1. Pretty much, yes; the X11 protocol is encapsulated in SSH. The client runs on the remote system, the server runs on the local system.

  2. With VNC, only VNC traffic goes over the network (optionally encapsulated, e.g. using SSH). The X server runs remotely, and the VNC client connects to the VNC server which connects to the X server (or is the X server). X clients can run anywhere as long as they can connect to the X server; typically they’re on the same, remote, system.

  3. Xpra implements its own protocol, it doesn’t forward X11. The situation is identical to VNC. (Xpra can also export a display using HTML5.)

  4. See above. The differences between Xpra and VNC include that Xpra supports rootless windows, provides more control over the display... VNC has been around for longer than Xpra (1998 v. 2008), is supported natively by tools such as QEMU, and has clients available for more platforms than Xpra. Xpra is very much X11-oriented (i.e. it handles X11 clients), whereas VNC can forward displays on many different systems, not necessarily involving X11 (Windows etc.).

  • Thanks. I remember xpra is a X server (en.wikipedia.org/wiki/Xpra). so does it implement X protocol besides its own protocol? How doess its own implementation of X protocol work and shouldn't x client run on remote and X server (i.e. xpra) run on local? Any difference between xpra used for forwarding the entire desktop and used only for starting a remote X client? – Tim Mar 11 at 19:33
  • Yes, it implements both protocols: it’s an X11 server for X11 clients (the applications which you want to see), and an Xpra server for Xpra clients. The Xpra protocol isn’t an implementation of X11. The Xpra server typically runs remotely, but it doesn’t have to; however all the X clients have to be able to connect to it (potentially encapsulated). There’s not much difference between forwarding a complete desktop and a single window; could you be more specific? – Stephen Kitt Mar 11 at 19:43
  • The above isn’t quite right, Xpra doesn’t implement X11 itself, it uses Xvfb as X11 server. – Stephen Kitt Mar 11 at 19:50
  • Thanks. I have some trouble picturing a diagram of x clients, x server, xpra, and protocols between them, which I guess is the reason that I don't know why my xpra command fails (unix.stackexchange.com/questions/505699/…)? – Tim Mar 11 at 19:52
  • I was wondering if I am too slow to figure out unix.stackexchange.com/questions/505699/…, and just give up – Tim Mar 12 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.