I built a functional GUI for Linux 0.11 from scratch
Posted by DifficultBarber9439@reddit | linux | View on Reddit | 109 comments
Hey everyone,
Iโve been diving deep into the early days of Linux and decided to implement a functional (albeit primitive) GUI on top of Linux 0.11. My main goal was to understand the interaction between kernel interrupts and framebuffer rendering in a vintage environment.
Technical Implementation:
VGA Driver: Developed a custom driver to handle 640x480 resolution (16-color mode) by writing directly to VGA registers.
Window Manager: Built a lightweight windowing system that supports basic movement and stacking logic.
Event Handling: Integrated PS/2 mouse support and keyboard interrupts. The GUI processes these events through a custom event loop integrated into the kernel.
Graphics Library: Implemented a primitive rendering engine for drawing pixels, lines, and rectangles directly to the frame buffer.
The Choice of 0.11:
I chose version 0.11 because its codebase is compact enough to be fully understood, yet it provides a "real" Unix-like environment. Managing memory and task switching while pushing pixels has been an incredible low-level engineering challenge.
Current Roadmap:
Optimization: Improving the redraw logic to eliminate flickering (implementing a back-buffer).
Applications: Porting a basic text editor to run within the window manager.
Kernel Stability: Refining interrupt handling for smoother mouse movement.
Note: This is an ongoing project focused on OS development and learning the fundamentals of early Linux architecture
PlacentaOnOnionGravy@reddit
Sadly people don't care like they used to about these things. It's all about AI models. I'm going to start carving wood again
turdas@reddit
Ironically this has a high chance of being vibecoded, given OP's post history and the fact that all his comments in this thread read like they were written by AI.
Lawnmover_Man@reddit
It sadly absolutely is vibe coded. Look at the post history of OP. There's some really weird stuff in there, and a lot of it looks AI written. There's also the good ols tell-tale-sign of "we're making this" or "my team", when it is obviously just him.
Also, somebody here mentioned a very old GUI that was ported to for Linux, MGR. OP instantly shits on it and thinks it's just a TUI. He obviously didn't ever really look at it before writing that.
I think this is very much vibe coded, and OP acts like some kind of kernel hacker to appear as cool on the interwebs.
DifficultBarber9439@reddit (OP)
Calling it 'vibe coded' is a bold claim, especially when you're talking to someone whoโs been in the low-level engineering trenches for over a decade. Iโve been doing this for 11 years; digging through 30-year-old kernel source code isn't 'vibing' for me, it's just Tuesday. As for MGR, my comment was about its architecture compared to what I'm aiming for here. If you think a decade of experience looks like 'AI writing', maybe that says more about your expectations than my work. Feel free to check the source when I release it, if you can read it. Cheers
dejecaal@reddit
This obviously AI-written response sealed the deal for me. You're full of shit.
PlacentaOnOnionGravy@reddit
How can you tell?
dejecaal@reddit
It could just be AI translated, though given OP's post history I expect it's fully AI-written. His posting history is full of obvious fully slopped comments and projects. A month ago he bragged about having made a 78k LoC indie game and was about to release it on Steam, but then mysteriously deleted the post. He looks to be a Turkish teenager who's not particularly good at English and has a habit of posting vibeslop in various communities.
fatihmtlm@reddit
Btw his Turkish sounds like AI too!
Lawnmover_Man@reddit
It is a bold claim indeed, because I can't prove it.
That's just bullshit. You didn't even really look at it. Pretending that you did doesn't really make your claims of not using AI not more believable.
DifficultBarber9439@reddit (OP)
Believe what you want to believe. While you're busy being a detective, I'll keep building. Cheers.
XeroRony@reddit
nao faz sentido um GUI de arquivos nesse kernel a menos que queira se vangloriar e aumentar o ego.
turdas@reddit
The feature list in the OP instantly tipped me off because it's exactly the kind of thing Claude writes.
voorgevoel@reddit
OPโs profile picture is also AI-generated, if that means anything.
hpela_@reddit
I mean, writing GUIs for early Linux kernels was never really mainstream... so it seems inappropriate to compare what "everyone is doing" to a niche. I'd bet there are WAY more people interested in low-level Linux tinkering today than at any point in history.
Why so much cynicism?
windsostrange@reddit
In fact, we're seeing an obvious burst in tinkered projects like this in typically inaccessible niches as a result of the widespread availability of LLM rails. I guarantee this was a vibe-coded project, same as the explosion in /r/commandline TUI-based tools that are also cagey and closed-source.
turdas@reddit
Vibecoded projects by (predominantly) teenagers have become such a blight on the open source community.
Not that there's anything wrong with hobby projects (it's how most of us learnt), but vibecoding makes it possible to create something in a couple of days that superficially looks well developed but is actually complete garbage under the surface. And because it took the author all of one weekend to make it, they're liable to lose interest in the project just as quickly.
A lot of communities are adopting a "no personal projects under 3 months old" rule to combat this and it seems to work quite well. Almost any real project worth other people's time is going to take longer than that to develop.
hpela_@reddit
Oh yea, didn't even think of the irony that this is probably vibe coded at least in part, or LLMs were involved somehow even if just for question asking lol
shroddy@reddit
AI living rent-free in your head?
PlacentaOnOnionGravy@reddit
Nah...I'm ML engineer (from software engineering to devops/site reliability engineer to this) and I know things you don't.
Business_Reindeer910@reddit
I don't think that's true. I doubt the number of people who cared about this 5 years ago (before AI) was any different.
DifficultBarber9439@reddit (OP)
AI is cool, but understanding how the registers work is where the soul is. Thanks for the support! ๐
PlacentaOnOnionGravy@reddit
You're welcome. This is actually really beautiful. Guess I felt a bit synical when I posted. Sorry about that. I really do support you and your travels. Good luck buddy!!
DifficultBarber9439@reddit (OP)
Thank you so much! Itโs been a passion project for a while. Getting support from this community is already more than I expected. ๐๐
Famous-Assumption-93@reddit
Vazgeรง kanka manyak olursun
DifficultBarber9439@reddit (OP)
Merak etme 11 senedir olmasiysam sahada olmam
yahia_h@reddit
This looks really cool, and i really want to start, could you share the pattern please!??
xlibmadness@reddit
how exactly did you do the windowing system?
m3an1ngless@reddit
Eline saฤlฤฑk, GitHub'a falan koyacaฤฤฑn zaman mutlaka post at bu postu da gรผncelle daha yakฤฑndan da incelemek mutlaka isterim.
DifficultBarber9439@reddit (OP)
Tabikide efendim ลuan bazฤฑ kฤฑsฤฑmlarฤฑ cidden hayla รงok ilkel daha fazla ekleme yapฤฑnca mutlaka koyacaฤฤฑm teลekรผr ederim desteฤiniz iรงin ๐๐ค
-Nastyenka@reddit
Merhaba? TURKISH AS BAYRAKLARI๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ท๐น๐ทNICE PROJECT
DifficultBarber9439@reddit (OP)
๐๐
JamieDelCarmen@reddit
Why not just port an era-appropiate version of X11?
XeroRony@reddit
pq nem fazer prompt direito ele consegue
SchriftShift@reddit
cool
palapapa0201@reddit
Did you vibe code this
DifficultBarber9439@reddit (OP)
Using AI for aesthetic profile assets and using it to orchestrate a 1991 kernel are two different things. I've been a low-level dev for 11 years; I use tools where they make sense. If you think an AI can magically handle Linux 0.11 register management and custom VGA drivers without a senior engineer's guidance, you've never touched a kernel in your life. Focus on the code, not my pfp okey ?
palapapa0201@reddit
Where is the code?
DifficultBarber9439@reddit (OP)
I see youโre an expert in 'hat swapping' for plushies. Maybe stick to that instead of trying to lecture a systems architect on 30-year-old kernel source code. Let the adults handle the engineering. Cheers ๐ค
DifficultBarber9439@reddit (OP)
Git addres
hismailbulut@reddit
Merhaba tebrikler
DifficultBarber9439@reddit (OP)
Merhabalar รงok teลekkรผr ederim efendim ๐๐ค
MatchingTurret@reddit
Look at https://en.wikipedia.org/wiki/ManaGeR
DifficultBarber9439@reddit (OP)
Dude, this is MS-DOS style and it's a THOUSAND TIMES EASIER to design.
MatchingTurret@reddit
I have no idea what this means. There were GUIs running on top of MS-DOS, like the initial Windows. But I don't see how this is a "THOUSAND TIMES EASIER to design".
DifficultBarber9439@reddit (OP)
I'm talking about the simplicity of the drawing logic and memory management. Modern systems have layers of abstraction that make simple pixel manipulation a headache. Designing something straightforward like this on a 1991 kernel is about getting back to the basics where you have direct control. That's the 'easy' part I'm referring to
Lawnmover_Man@reddit
...? MGR doesn't seem to be a TUI. It's a GUI.
SummerOftime@reddit
Cool project! Will you be releasing the source code?
DifficultBarber9439@reddit (OP)
Yes, definitely! I'm currently cleaning up some of the 'hacky' parts of the kernel and documenting the graphics library. I want to make sure it's readable before pushing it to GitHub. Stay tuned!๐๐
Key_Hurry_4570@reddit
This is dope il totally be putting it on my ps2 haha
MoshiMotsu@reddit
If you want the transparency sans the noise, you could always lock Issues and PRs until you feel like it's in a good state and add "WIP" to the readme. Then you get the benefits of people observing your project, without necessarily having to deal with all those wonderful (/s) things that the F/LOSS community can be known for... Godspeed on this project!
OlOS_linux@reddit
How did you did it ? Have you used some special software or what ?
DimitroBest@reddit
nice
Odio-gli-imbecilli@reddit
Yes but... can it run Doom?
Kok_Nikol@reddit
Terry is that you?
egesarpdemirr@reddit
Very cool! Good work brother!
proton_badger@reddit
Awesome. I remember drawing on the screen by writing into a memory region on MS DOS, was good times.
brunhilda1@reddit
Is it possible to rebase this atop minix?
DuendeInexistente@reddit
Now this is what I'm here for. Fantastic work OP.
DifficultBarber9439@reddit (OP)
โจGlad I could provide some quality content! Low-level stuff deserves more love on this sub. Cheers! โจ
caligari87@reddit
CatCatInc@reddit
Bro is an OW (Original Wizard) ๐ฅ๐ฅ๐ฅ
sacules@reddit
Very cool, in uni we looked at XV6, a modern implementation of a certain version of Unix, and tinkered with it and also wrote some vga drivers to draw static things on screen. Fun times.
floppyjedi@reddit
This is very cool. Personally I've been thinking of doing the same, but on a whole different (easier!) level, IE building some kind of graphical shell that runs on Raspberry Pi Zero on top of a minimal Linux install, using my own "game engine" of kinds.
Motivation for me is that running the built-in shell of the "default" distro is slow as hell, while I know the hardware can render 60 fps if you think hard enough about what you do. My shell would probably have "programs" built-in, and be super limited, but everything it could do, would be fast. I'd still use OS functions, OpenGL, and SDL (but limit use of SDL, not using its graphics stuff. I don't want just "accept" text rendering overhead for example.)
litescript@reddit
dog this is crazy, in the best way. i love returning to core principles and figuring out how things are done!
DumbbMoneyy@reddit
Love itttt
DifficultBarber9439@reddit (OP)
๐๐ค๐
Knopper100@reddit
๐๐๐
dryroast@reddit
This is AWESOME! I love graphics programming and MMIO, I was going to get into making some display boards for QEMU or something similar (but I need to finish my class first heh). This is the stuff we need more of!
DifficultBarber9439@reddit (OP)
Thanks a lot! MMIO is where the magic happens, right? Itโs definitely more rewarding than using modern high-level APIs. Good luck with your class, hope to see your QEMU display boards soon!๐ค๐
enygmata@reddit
What exactly runs in kernel mode and what runs in userland? How do you connect the two ? Did you implement additional ioctls/syscalls or what? Asking because I don't recall userland being able to catch interrupts or write to hw registers but I'm a decade out of the loop.
DifficultBarber9439@reddit (OP)
Great questions! Since Linux 0.11 is quite minimal, I actually implemented a few custom syscalls to bridge the gap. The window manager logic stays in userland, but the raw pixel drawing and interrupt handling for the mouse/keyboard are handled through a custom graphics driver I integrated into the kernel. Itโs definitely a bit 'hacky' compared to modern standards, but it gets the job done on this old beast!
NeySlim@reddit
I wish I had your patience! Awesome.
DifficultBarber9439@reddit (OP)
Yea Thats True ๐
New_brianG@reddit
Awesome! Things like this keep my hopes up.. it compensates for all the wannabe-techbro's bullcrap I see online. Keep it up buddy!
DifficultBarber9439@reddit (OP)
Contiuneee . . . ๐
dr_incident@reddit
Such a cool idea! Keep up the good work
DifficultBarber9439@reddit (OP)
So Thank you ! โญ
RedSquirrelFtw@reddit
Wow that's really cool! This is something I'd really like to get more into, is learning the lower level part of Linux and how things work. Always thought it could be fun to make a distro with my own DE. I would probably start with LFS and go from there myself, but doing it with an older version is pretty neat too as a fun experiment.
DifficultBarber9439@reddit (OP)
Sharing the source code will make it easier to find inspiration! ๐ And I admire your determination! I support you!
zoharel@reddit
Impressive. Better than average chance you could eventually port it forward using fbdev on a newer kernel.
DifficultBarber9439@reddit (OP)
Yes, we'll try it in the future! ๐
Sealbhach@reddit
Very cool. Looks big and professional.
DifficultBarber9439@reddit (OP)
Thanks Thanks ๐
Ybalrid@reddit
that's pretty neat
DifficultBarber9439@reddit (OP)
Thanks my man ๐
zvzvx12@reddit
Where can I get it
DifficultBarber9439@reddit (OP)
I'll fix the code, document it, and share it on my Git account. Plus, compiling it is VERY EASY! ๐
Jmc_da_boss@reddit
This is awesome, i miss when this type of content was more normal and LLM slop was not a thing :(
cenkerc@reddit
sana da merhaba
SpeedDaemon1969@reddit
Very nice! I have often wanted to see a project like this for Linux, that breaks the mold of the standard UNIX X workstation. One thing that I like about the UNIX paradigm is that it's modular, and users can pick and choose the tools that they want, not have them predetermined by a large corporation. I wonder how different things might have been for the Linux community if there had been a basic GUI for it, separate from X.
One of my favorite DOS utilities was Partition Magic, a program that managed to simulate the graphics of Windows 95 in an executable that fit onto a floppy disk. Back then it would have been cool to have had a basic VGA graphical environment for Linux without all the complexity of X. It's never too late!
Cyberspace_Sorcerer@reddit
This is awesome! Do you plan on moving up to more complicated versions of linux once you're done with this?
DifficultBarber9439@reddit (OP)
Good question! I might look into 2.x or 4.x versions eventually, but there's a unique charm in 0.11's simplicity that makes it perfect for these kinds of 'bare-metal' experiments. Let's see where this road leads!
Cyberspace_Sorcerer@reddit
Yeah make sense! Hope you have a fun time :))
-Outrageous-Vanilla-@reddit
Awesome!
Keep me posted if you do release the source code.
DifficultBarber9439@reddit (OP)
Yes cooming soon ๐
pawelkuzia@reddit
That's crazy on a best way possibile! Great job!
DifficultBarber9439@reddit (OP)
Thanks man ๐
UPPERKEES@reddit
https://youtu.be/dxIPcbmo1_U?is=Y2zMMnxEBlUWcWX2
Ziargena09KxN@reddit
Adamsฤฑn kankaaaa
DifficultBarber9439@reddit (OP)
Thanks adamฤฑm ๐๐ค
Ziargena09KxN@reddit
Bu ne hฤฑz maaannnn
Gooooomi@reddit
ig no copyfail exploit on this
DifficultBarber9439@reddit (OP)
Hard to have modern exploits when you're busy just trying to get the VGA registers to behave! Complexity is the enemy of security anyway. ;)
walmartbonerpills@reddit
Nice. I've been playing around with a single process userland that talks directly to the framebuffer. It's fun to do weird things with the kernel
DifficultBarber9439@reddit (OP)
Awsome โจ๐
WinnowedFlower@reddit
Incredibly cool, hope you get coverage for this.
DifficultBarber9439@reddit (OP)
I really appreciate it. Even a small coverage would be amazing for the 0.11 hobbyist scene!๐
Additional-Milk1426@reddit
This looks really cool! Good work man!!
DifficultBarber9439@reddit (OP)
Thanks a lot! Happy to see people still enjoy seeing some old-school Linux development.๐