Sharing an X11 Server Across Hosts with FamilyWild
Posted by shirozuki 1 day ago
Comments
Comment by yjftsjthsd-h 23 hours ago
> On a single-user machine that sounds harmless, but X has no isolation between clients: anyone who can reach the server can read your keystrokes, grab the contents of any window, and inject synthetic input. xhost + hands that capability to every local user and, if your server listens on TCP, to the network. Even the narrower xhost +local: still trusts every UID on the box.
Does modern Xorg even support TCP? I know it doesn't default to allowing it, and the last time I actually wanted to run X11 over the network I ended up using socat against the socket file. Controlling access by user could have some value, but only under very specific threat models, especially since containers won't be able to reach the socket unless you give it to them on purpose. (Actually, can you just chmod o-rwx the socket?)
So I'm really skeptical of ever practically needing a more complicated fix when you can just xhost +
Comment by jolmg 22 hours ago
Yes. It works well. X11 over Wireguard works so much better than ssh -X. Haven't tried over the internet, but in a LAN you can't tell the difference between local and remote windows, at least with Emacs.
Comment by guenthert 9 hours ago
It works, the user experience however might not be great. Latency is your enemy, as are occasional drop-outs. For remote connections outside a LAN, naked X11 isn't recommended. NoMachine's NX (or the shrink wrapped X2Go) were better suited for such.
Comment by jolmg 7 hours ago
Comment by guenthert 7 hours ago
Comment by jolmg 6 hours ago
> nxproxy is a tool that allows one to tunnel X sessions through the NX compression library. nxproxy is a backend application utilized by various client application (Remmina, X2Go Client, PyHoca-Gui, Arctica Client, TheQVD Client, etc.).
https://manpages.debian.org/trixie/nxproxy/nxproxy.1.en.html
It's what implements the X11 compression tunneling. "X sessions" in this case seems to refer to "X11 connection sessions" rather than "desktop sessions".
Checking
https://en.wikipedia.org/wiki/NX_technology
there's a diagram of how NX works. Both hosts have nxproxy for the compression tunneling, and the remote has nxagent which is basically like Xnest/Xephyr (which would do more of the "desktop session management" role). Things like X2Go and FreeNX seem to add ssh tunneling on top of that.
The important bit for purposes of remote X11 clients over the internet seems to be nxproxy. Hope I'm right anyway. Kind of hate having to deal with windows inside desktops inside windows.
Comment by inigyou 8 hours ago
Comment by jolmg 4 hours ago
https://man.archlinux.org/man/Xserver.1#nolisten
The executable may be X, Xorg, Xserver. The call may be handled and configurable by xinit or the display manager being used.
Comment by ButlerianJihad 22 hours ago
You can reconfigure it, restart it, or start a secondary server. And check your firewall/packet filtering setup while you're at it.
There are several cryptographic security methods for the xauth(1) system.
https://manpages.ubuntu.com/manpages/resolute/man7/Xsecurity...
Notably, "si" or "server interpreted" is not cryptographically secure. However, you can share MIT-MAGIC-COOKIE values easily by copy-paste into another user's xauth command.
Comment by bobmcnamara 22 hours ago
Comment by maxwell_smart 21 hours ago
Comment by wahern 20 hours ago
For a full desktop session, X11 over TCP should be much faster just because each X11 client app has it's own TCP connection, whereas for SSH X11 forwarding every app is tunneled over a single TCP connection.
Comment by jolmg 20 hours ago
But even with a single X11 connection, the difference in performance is huge between it being tunneled through SSH and not.
Also, whether you have one connection or multiple between 2 hosts, it's still the same bandwidth for the most part.
Comment by somat 18 hours ago
But it is neat for anyone to just be able to throw a application up on the big master display.
Comment by TacticalCoder 23 hours ago
I'm not defending xhost or advocating to use it but... If you mention narrower version of xhost, then why stop at:
xhost +local:
and not mention that you can do: xhost +si:localuser:jack
As an intriguing unrelated sidenote you can do: xhost +si:localuser:jack
open an app, then do: xhost -si:localuser:jack
and then user jack cannot, except through the app already launched, display on the X server.Comment by lysace 22 hours ago
We ran some weird X11-based apps on these Sun machines required for courses that way. Web browsing was faster locally, even with a lowly 486.
Comment by calvinmorrison 1 day ago
Comment by shirozuki 23 hours ago