61

I want to know how to create a simple desktop environment, such as KDE, Gnome and LXDE, for Linux, or specifically, Ubuntu/Kubuntu, but I do not know how to begin and how complex it is.

I want to create a simple, efficient and lightweight desktop and to reproduce some good features from KDE, Gnome and Windows XP. I do not want to reinvent the wheel, I want to design the graphical interface and main dialogs.

I could use C++ with Qt, or maybe with X11 calls. A simple desktop like TWM would be the first step, then I could add taskbar, start menu, new features and play with new ideas.

Thanks.

Edit

I have installed icewm and I think it is what I need to begin. On the login screen, I can choose if I use KDE (desktop environment) or icewm (window manager). I do not understand what a window manager actually is.

I have downloaded icewm source code and I am confused. There are some concepts that I have to understand, such as, what happens after the login screen when the desktop is loaded, how a window works, etc.

Edit 2

I think I need a good tutorial. I have to understand how a Window Manager or Desktop Environment work. There are some concepts that I have to know.

Lin Du
  • 88,126
  • 95
  • 281
  • 483
Squall
  • 4,344
  • 7
  • 37
  • 46
  • 8
    It might help to understand the difference between the term "desktop environment" and "window manager". A [window](http://fluxbox.org) [manager](http://icewm.org) manages windows. Many wms have little or no support for putting icons and shortcuts on "the desktop", and basically use it as a (possibly) decorative backdrop for the windows. "Desktop environment" usually refers to a more comprehensive system with various productivity applications, interactive desktop, and a window manager. Therefore, it might help to start by creating a *window manager*. – William Linton Oct 23 '10 at 01:15

3 Answers3

51

This is no simple feat but by no means impossible.

Other people have done it, there are plenty of DE or WM out there so there is no reason that you, with patient, skill and lots coffee couldn't do something great.

Learn the difference between DE and WM.

Test different DE and WM, maybe one does exactly what you want it to do?

Make your own custom DE
Here is a guide to get you started creating your own custom DE

After doing all this you should be better equipped to figure out what you actually want to do.

Fork a project and get started.

James Risner
  • 5,451
  • 11
  • 25
  • 47
Jonas Söderström
  • 4,856
  • 2
  • 36
  • 45
  • The explanation is pretty good, indeed! Thank you, Jonas! However, the link from MakeTechEasier about creating a custom DE is all about using an existing DE and some ShellScript to run custom programs when the DE starts. It's not really about coding a DE from scratch. – Stanley Sathler Mar 11 '20 at 18:22
  • 1
    @StanleySathler the tldr is that a desktop enviroment is a suite of tools, the easier i found to start learning how these works is the dwm window manger. as i used and customized it, i noticed what it is lacking compared to a desktop enviroment. when first build, installed and launched into it, i was very confused, as i could not do anything; not even log out or shutdown. if you're willing to first start looking how it works before coding from scratch give that a shot. tips to not be as confused as i was: try the alt+a and the shift+altl+q shortcuts. and perhaps first read the "manual" xD – Fuseteam Jun 16 '20 at 20:40
18

These are all open source projects, so I suggest you grab one of the simpler window managers and rummage around in its source code. I should warn you, though: this kind of project is not for the faint-hearted, and the likelihood of your little toy project becoming a mainstream desktop is low, so don't go into this imagining it's going to be anything more than a learning exercise (and if it does become something more, you'll be pleasantly surprised).

Strategically, your best bet is to fork an existing WM, rather than trying to build a brand new one from scratch.

One final point: Qt is a windowing framework for C++ that sits on top of a window manager. It isn't a window manager, per se, like Gnome/TWM/etc. are. And, as @ptomato rightly points out, Gnome is actually a desktop environment that itself sits on top of a window manager, which is selectable, but defaults to Mutter.

Rudra Saraswat
  • 71
  • 1
  • 13
Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
2

I would use X calls and learn how to boot to a CLI (command line interface). Booting to a CLI allows you to switch between window managers / desktop environments. Then I would design a window manager. And finally finish off with a desktop environment.

It starts with frame buffers. These are how 80's graphics worked.

Then you have the X window system. This however doesn't show you multiple windows at once. Only one at a time.

A window manager is the program that controls where your windows go. This allows for multiple X windows to take up one screen.

A desktop environment then builds on that to add things like a task bar, start menu and desktop icons.

jgh fun-run
  • 72
  • 1
  • 13