10 ms·
Yserver: A modern X11 server written in Rust
- simmonmt 4mo agoThis is pretty cool - especially that it's at the point where it can be used with a real window manager. I'm curious why multiple screens is considered legacy baggage and thus out of scope, given how common multiple monitor setups are these days. I also have zero familiarity with X internals, so don't know if multiple monitor support is a horror show that'd be miserable to support.
- kwhat4 4mo agoProbably because Xinerama[1] and then later RandR[2] were an afterthought. [1] https://en.wikipedia.org/wiki/Xinerama https://en.wikipedia.org/wiki/Xinerama [2] https://xorg.freedesktop.org/archive/X11R7.5/doc/man/man1/xrandr.1.html https://xorg.freedesktop.org/archive/X11R7.5/doc/man/man1/xr...
- chadgpt3 4mo agoX screens are legacy. It used to be you could connect to a particular screen by number to open windows on that screen but the modern way to do it is to have one big virtual screen. X screens were like having a separate X server for each monitor, but with a single shared cursor and shared VRAM. You can see why that's an obsolete model.
- simmonmt 4mo agoYep. When did virtual screens come in? My last full time experience with X was with Xsun in the early 2000s under Solaris. There was a shared cursor, I thought you could drag windows between monitors, but I also thought the DISPLAY variable was different for each (though I could be misremembering)
- Liskni_si 4mo ago2007 is when xrandr 1.2 came and made it feasible to use on a laptop - enable/disable outputs dynamically without restarting X. Xinerama (the extension that enables one virtual screen over multiple outputs) existed before but the layout could only be defined statically - so you'd need to restart your X server with a different config if you wanted to connect a monitor or a projector or something.
- rwmj 4mo ago$DISPLAY is definitely different for each X11 screen, ie. :0.0 for the first screen, :0.1 for the second and so on. (:1, :2 is used for more instances of the X11 server). I can't recall any application able to use multiple X11 screens (except in the trivial sense that you could set DISPLAY when starting the application), and I've been using X11 since X11R4.
- rixed 4mo agoPlease do not see any malice in this naive question, but why is that an obsolete model? Back in the days I had very different displays that I could use to display various windows of a flight simulator (some dedicated to some instruments, the big one for the front view, for instance) and it was quite nice. It sounds like that would not be easy to replicate with a single shared frame buffer, but maybe I'm wrong (I've been using nothing but a small laptop screen for decades)
- chadgpt3 4mo agoIt's much easier to place a window at a specific position on a large frame buffer than to drag a window between screens when they are separate display servers.
- deleted 4mo ago[deleted]
- somat 4mo agoI suspect(with out reading the source to find out) that screens are the traditional X11 screens as opposed to the modern xrandr combined screen. Traditionally each screen in an X11 setup was it's own separate thing with it's own separate frame buffer. While technically applications could move between screens, this depended on the application caring enough to do so. It had to maintain two(or more) mirrored windows(one per screen) and keep them all aligned. So realistically no application did this. The modern method of doing multi monitors on X11 involves one large virtual screen with each monitor assigned a section of it. This has downsides, for example; this is where the myth that X11 can't do mixed DPI setups comes from. But it has one huge massive overwhelming upside. The application does not have to be aware that there are multiple screens and multi monitor setups just work.
- ltrever 4mo agoCan you pls share smt on how to properly do multi dpi in X? It is hard to find and I struggle with it
- ndiddy 4mo agoThe mixed DPI support on X11 is just that each monitor provides a DPI attribute that applications can query. It's up to the application or the toolkit it uses to actually look at this attribute and scale itself properly. In practice, this means that only Qt software will have DPI awareness on multi-monitor setups, and it requires having the "QT_AUTO_SCREEN_SCALE_FACTOR=1" environment variable set for applications that don't explicitly opt into it. What most X11 users actually do is set the global DPI to that of the highest DPI monitor, and use xrandr to scale down the framebuffer of the lower DPI monitor, which "zooms it out". Note that this has performance and image quality implications. There's a guide on how to do this here: https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html https://blog.summercat.com/configuring-mixed-dpi-monitors-wi...
- somat 4mo agoThe irony is that despite the myth to the contrary wayland does not even try to handle mixed DPI at all and only fakes it via the fractional scale hack and X11 has supported mixed DPI from probably day one. Admittedly X11 mixed DPI was using separate screens which were awkward to deal with and early versions of the unified screen tech (xinarama and xrandr) did not support mixed DPI. And even modern X11 while it provides the needed DPI information requires the application to care enough to support it. Which really means unless the toolkit provides it for free most applications are not going to do anything,
- aniceperson 4mo ago[flagged]
- qweqwe14 4mo agoNo.
- IshKebab 4mo agoWhy? Wayland hasn't been smooth sailing by any stretch but it's still time to let X die. Also this is slop.
- kennywinker 4mo agoProjects like this really need to disclose how much ai was used. Otherwise my default assumption is it’s slop, which would be a bummer if someone carefully crafted this with some light ai assistance.
- hokkos 4mo agoSeems pretty accurately disclosed to me https://github.com/joske/yserver/graphs/contributors https://github.com/joske/yserver/graphs/contributors
- phendrenad2 4mo agoI agree, as soon as people start proudly tagging their vibe-coded projects, the sooner people will stop judging AI projects as "slop" based on nothing at all.
- asveikau 4mo agoI was under the impression that this person is pretty heavily dependent on Claude. And for example, it's a weird signal to me when somebody believes the reason X11 has baggage is because it does byte swapping for endianness. This statement alone taints the entire rationale for the project.
- cute_boi 4mo agoChecked and as with many project in HN, this is very slop..I am sure author haven't even reveiwed more than 20% of the code.
- le-mark 4mo agoI really wish people gave a damn about the “gui over the network” problem x11 solves. Wayland drops this use case entirely so we’re pretty much universally stuck with vnc. Microsoft rdp is a great solution for this in windows land.
- wmf 4mo agoWaypipe exists. Somebody needs to do the integration so you can run ssh -W though.
- LeFantome 4mo agoWhy? Isn’t “waypipe ssh” more “the UNIX” way. There is also wors.
- nananana9 4mo agoThey drop this use-case, but still use sockets for IPC, so I still have to pretend I'm doing network programming, serialize my messages over the "network" and "flush the stream" (insanity) but don't actually get any of the benefits of this model. I genuinely wonder if they stopped to think why X11 has sockets or just blindly copied it over. Or are they unaware other forms of IPC exist, that don't require you to go through the kernel 13 times to send a byte to the other process?
- mort96 4mo agoWhat would you rather they use to communicate with the server? Message passing via shared memory? UNIX sockets are perfectly fine for IPC with small amounts of data, and is how everything in UNIX has always done it, network transparency or not. They provide a simple, efficient and reliable communication channel between two processes.
- p-o 4mo agoWayland uses UNIX socket for message passing, but then offload most of the work to shared memory when the real work begins (GPU rendering). I just wanted to add some nuances that it's not as black and white as this comment made it seem.
- self_awareness 4mo agoWhy it "can't" work under nvidia? Xorg worked under nvidias for years.
- deleted 4mo ago[deleted]
- skeledrew 4mo ago> dropping legacy baggage (multiple screens[...] Looked nice, but crossed it off as soon as I saw that, as I'm working on a project currently that uses many screens. Can't just call a thing legacy because you and the people you directly know aren't using it.
- deleted 4mo ago[deleted]
- rmu09 4mo agoMaybe they mean X11-screens. That are more or less independent screens, you can't move a window from one to the other for example.Emacs supports that somewhat with the "open new frame on display server" menu option, but usually, multiple screens are not very useful. Nowadays, multiple monitors present one big virtual framebuffer and only one logical X11 screen.
- freehorse 4mo agoIt is a niche feature, but it is still used eg when an application wants to have good control over a screen's frame buffer to display sth in an external monitor and minimise disturbances. I think it is fairly standard in psychophysics experiments, at least with some software. That's where I worked with such a ("zaphodsheads") setup.
- arcfour 4mo agoThey are also roughly analogous to the modern DE concept of "Workspaces" which people seem to enjoy.
- wtallis 4mo agoI think X11 terminology may be causing some confusion. Refer to https://nouveau.freedesktop.org/MultiMonitorDesktop.html https://nouveau.freedesktop.org/MultiMonitorDesktop.html The normal, usable way to have multiple monitors for your X11 desktop environment is for them to all be combined into one logical screen that you can move windows around in, and that applications aware of the right extensions can discover the actual physical layout of the monitors that comprise the single logical screen. Multiple screens in that X11 sense is a far more obscure feature than simply supporting more than one physical monitor.
- deleted 4mo ago[deleted]
- michaeltm 4mo ago[dead]
- vidarh 4mo agoLove seeing this. I'd be interested in seeing how much more could be shaved off by doing things like offering an xcb/xlib shim that moves more functionality to the client side (e.g. server-side font support are trivial to move client-side) as a means to deprecate features on the server side that most modern X11 apps don't use anyway.
- aleph_minus_one 4mo agoConcerning the name "Yserver": be aware that there also existed (the implementation is still available for download) the "Y Window System" > https://www.y-windows.org/ https://www.y-windows.org/ by Mark Thomas as an experimental sucessor of the "X Window System" (its development has been cancelled for a long time; the latest release that is available on this website is from 2004). The German Wikipedia still mentions the "Y Window System": > https://de.wikipedia.org/w/index.php?title=X_Window_System&oldid=266200922#Gesteigerte_Einheitlichkeit https://de.wikipedia.org/w/index.php?title=X_Window_System&o...
- simonask 4mo agoOn general principle, I think 22 years of inactivity is perfectly reasonable for considering any software project perfectly dead.
- aleph_minus_one 4mo agoThat's why I wrote "existed" (simple past).
- Klonoar 4mo agoThe “be aware” is the problematic text; nobody cares that a two decade old dead project has the same name.
- aleph_minus_one 4mo agoPeople who have been programming for a long time often have very good memories of old projects and software in which they had a lot of hope, but which failed at the end.
- Natfan 4mo agoi feel likt there's likely more programmers who weren't aware of a 20yo (unfortunately) failed project, compared to the amount of programmers who would be aware of this project, if it succeeded
- hypfer 4mo agoI'm really just tired of all these "projects" that in the end just turn out to be Claude. There is no need to put this code on GitHub. Everyone with an API key can achieve the same if you hand them the prompt. This is like committing build artifacts to version control. On top it's such a lame idea. "What if rewrite in rust applied to X server". Fits on a napkin. Man what a nothingburger :(
- scrollaway 4mo agoAh yes, the famous zero-shot X11 server. Aren't you clever.
- hypfer 4mo agoWould you be happier if I wrote "the prompts"? Would that change anything about the fundamental cliche-ness here? Also, no, I'm not clever, but not sure what that has to do with this comment chain.
- scrollaway 4mo agoI'm just so tired of these lazy, worthless comments about any AI-written software. Look, I've been writing open source software for 20+ years, and after getting seriously burned out by it, I picked it up again with Claude (proof: https://github.com/jleclanche https://github.com/jleclanche) I can tell you a few things from that: 1. I'm writing better software than before, because AI is less lazy than I am. It's not necessarily always smarter, but writing correct software has gotten so stupidly cheap that it doesn't make sense not to do things right... so when you tell AI to do things correctly, it tends to know what you're talking about. 2. I'm more curious than before, because AI gives me time to explore many paths, very fast. A project like this one, like someone else said elsewhere in the comments, is more about the journey than the destination. There is no "write me an X11 server but do it in rust and post on hn" prompt that does the thing. There's a journey of building, learning, understanding. I'm not saying the resulting software is particularly valuable, but the journey is. This is HN, and you're shitting on someone who is using the most powerful pieces of technology we've achieved to go on a journey of discovery of X11 internals for the past 2 months. It's just shameful. And yeah, if I were the author, I'd run claude over all the transcripts and extract a story with what's been taught and learned throughout. But I'm not the author. Just someone enjoying living in absolute science fiction.
- Venn1 4mo agoI compiled it on Debian 13 and it works with XFCE4. Granted, things are a bit squirrely until you disable the compositor. No luck getting it to play nicely with LightDM so I ended up launching it from a TTY. This was on an AMD mini PC I had lying around the studio.
- sunshine-o 4mo agoThe wayland.fyi people might have a point on the whole X11 vs Wayland thing [0]. At least it is worth reading. - [0] https://wayland.fyi/ https://wayland.fyi/
- LargoLasskhyfv 4mo agoSeems informative, but I hate what they are doing with the mouse pointer.
- guesswho_ 4mo ago[dead]
- drnick1 4mo agoYet another vide-coded, MIT-licenced Rust rewrite, yawn.
- LeFantome 4mo agoIt is kind of ironic that all the would be X successors waiting until Wayland took over before appearing. Something like XLibre or Phoenix would have been taken very seriously 5 years ago.
- Ferret7446 4mo agoI think it was only recently that Xorg started dying and Wayland became mostly usable for most people. That was when I switched over, and I assume a lot of others as well.