DEV Community

Cover image for Building a 3D Login Screen for Linux with LightDM WebKit2
Samay Kumar
Samay Kumar

Posted on

Building a 3D Login Screen for Linux with LightDM WebKit2

Linux has always been more than just an OS to me. It’s this massive playground where you can tweak almost everything like your bootloader, your window manager, your terminal. But for some reason, everyone leaves the login screen alone.

Most LightDM themes are incredibly boring. You get a static wallpaper, a box to type your password, and that’s about it. It feels like an afterthought.

I wondered if we could do something crazier.

The Idea

I didn’t want to build just another flat theme. I wanted to see if a modern, real-time 3D scene could actually run inside lightdm-webkit2 without lagging out the system or looking like a tacky web experiment from 2010.

That curiosity turned into Plant, an open-source LightDM WebKit2 theme powered by Three.js.

The concept is super minimal: a clean login interface on one side, and a 3D plant on the other that gradually grows over time...not really. Everything else stays out of the way.

Why a plant, though?

Usually, when developers customize their Linux setups (especially the r/unixporn crowd), everything is flashy, cyberpunk, or neon. I wanted the exact opposite.

Plants represent quiet growth. They don’t just bloom and fade away; they grow slowly, bit by bit. That idea inspired the whole visual vibe and the little text lines I put on the screen:

Flowers fade, but this one grows with time.
Samay ke saath bhi, Samay ke baad bhi.

The line translates to "with time, and after time." It has a nice personal meaning for me, but it also just fit the whole philosophy of the project.

The Tech Stack

Since lightdm-webkit2 basically just renders HTML, CSS, and JavaScript, you can throw pretty much any modern web tech at it.

For Plant, the stack looks like this:

  • Three.js for rendering the 3D environment.
  • A custom GLTF model for the plant itself.
  • Vanilla HTML, CSS, and JS for the UI.
  • LightDM WebKit2 as the display manager engine.

Honestly, getting the 3D model to render wasn't the hard part. The real pain was making sure the WebKit container didn't choke on it (thats why i build it on top of a theme hehe), and making sure the login functionality actually worked securely.

Building with AI (Let’s be real)

I’m not going to pretend I sat down and coded every single line of THREE.js from scratch. AI was a huge part of my workflow here.

I used it to spin up boilerplate code, figure out weird lighting quirks in parts of the 3D model which I hadn't touched before, and speed up debugging when things broke.

But AI doesn't build the actual project. You still have to figure out the overall architecture, make the interface look decent, test it repeatedly on actual Linux machines, fix the random layout breaks, and package the whole thing. It didn't replace the development process; it just saved me from a lot of repetitive typing.

Open Source & Installation

Once the theme was stable enough that it didn't crash my own display manager every time I booted up, I decided to share it.

Instead of making people manually copy random files into their directories and screw up their permissions, I packaged it properly.

If you want to try it out, it’s live in two places:

What's Next?

This started as a random "what if" experiment, but I want to take it a bit further.

Right now, if you want to change things, you have to dig into the source. I'm thinking of building a small CLI tool for it. The goal is to let users swap out the 3D models, tweak the color palette, change fonts, the quote, adjust animations with a few simple terminal commands, without touching the underlying code.

The Bigger Picture: HeimOS

Plant is actually just a tiny piece of a much larger project I've been hacking away at called HeimOS.

HeimOS isn't just another rebranded arch based Linux distro with a new wallpaper. It’s my attempt at creating a deeply polished, opinionated desktop experience where customizing your system doesn't mean editing fifty different dotfiles by hand. Projects like this theme will eventually form the foundational pieces of that ecosystem. Mostly its a package of multiple different customized open-source projects while maintaining those sweet aesthetics

Final Thoughts

Look, this project doesn't solve any massive global issue. It started because I was bored and wanted to know: "Can a Linux login screen render a modern 3D scene?"

Turns out, it can.

Sometimes the most fun projects are the ones that don't change the world. They're just the ones that let you try out an odd idea, learn how a specific subsystem works, and make your own machine feel a bit more like yours.

If you're running Arch, go check out the AUR package and let me know if it grows on you.

Top comments (0)