How to create a simple desktop environment?

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.


Solution 1:

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.
http://www.ghacks.net/2008/12/09/get-to-know-linux-desktop-environment-vs-window-manager/

Test different DE and WM, maybe one does exactly what you want it to do?
http://www.engadget.com/2012/11/30/how-to-pick-a-desktop-environment-in-linux/ http://www.gilesorr.com/wm/table.html

Make your own custom DE
Here is a guide to get you started creating your own custom DE
http://maketecheasier.com/easily-create-a-custom-lightweight-desktop-environment/2010/08/10

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

Fork a project and get started changing it!

Good luck

Solution 2:

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.

Solution 3:

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.