Hacker News new | past | comments | ask | show | jobs | submit

Opening Windows in Linux with sockets, bare hands and 200 lines of C

https://hereket.com/posts/from-scratch-x11-windowing/
loading story #40305488
The X Windowing system is a hackers delight.

If you have a remote server with UI, you can set up a X Window server on your Windows/MacOS machine and forward via SSH X messages to use GUI apps on your server, but view the result locally. The Responsiveness of the UI depends on your network capabilities.

This is fun and all, but if you lose your connection, your windows will go away and your program will usually exit.

It’s almost always more usable to run a desktop session in Xvnc on the server and connect to it with a VNC client, because if you get disconnected, you can just reconnect.

loading story #40306628
loading story #40307110
loading story #40309241
loading story #40312918
loading story #40308487
loading story #40306504
loading story #40306478
loading story #40307989
Sure, although originally you'd have an X Terminal (an actual dedicated terminal device running an X server, of varying levels of performance), rather than an X server program running on your computer (i.e. an X Terminal emulator).

The terminology is of course a bit counter-intuitive, since it's program-centric rather than computer-centric - the local terminal is the server and the remote computer (or rather program) is the client, utilizing the server as a display device.

It's a bit like a text terminal (VT-100 etc) except of course the X terminal has a network connection., With the VT-100 if you wanted to connect to a remote system you'd have to use a modem (acoustic coupler) to dial into a terminal server on the remote system. I don't think anyone ever made a text terminal with built-in telnet and ethernet.

loading story #40307379
loading story #40317786
I used to do this with Virtual Box running locally. I found the performance of the windows x client was superior to trying to use x directly in the virtual machine. I wish the protocol supported audio.
Hacker's Delight is also the title of a handy reference for numeric algorithm recipes.

https://en.wikipedia.org/wiki/Hacker%27s_Delight

This is how I run graphical Emacs in WSL. And how I was developing SDL games as well.

I hear this might become a native built-in feature in Windows but for now I just run an X client.

It's already here, for more than a year, both on Windows 10 and 11. I use this for emacs (with a GTK build) every day.
WSL has been able to open graphical Linux apps for a while. They use Wayland (with FreeRDP to the Windows Host) and XWayland for X11 apps.

https://devblogs.microsoft.com/commandline/wslg-architecture...

Meh we used to have to install oracle databases this way, and the performance was always shit even over direct connections w/cross cables.

I don’t think x over ssh is useful for much, can you imagine a browser this way?

loading story #40306719
loading story #40306436
loading story #40307806
loading story #40309131
loading story #40306468
loading story #40306422
loading story #40307753
Back in about 1994, there was a server at I think MIT that would stream a live TV signal to your X Window server.

Yeah, with no compression, that's right.

loading story #40305306
loading story #40305091
loading story #40306474
loading story #40304894
loading story #40304030
loading story #40306246
loading story #40304928
loading story #40306853
loading story #40306313
loading story #40304971
loading story #40305645
loading story #40306881