LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Want to develop Window Manager (https://www.linuxquestions.org/questions/linux-general-1/want-to-develop-window-manager-784595/)

macrosoft1 01-25-2010 08:37 AM

Want to develop Window Manager
 
OK, so i have been thinking of developing my own distro. After experimenting with LFS(Linux From Scratch), i now know even more Linux, but i could not find out to create a Distro. Now, i want to use an existing Linux Distro, modify source code, and develop my own Window Manager(like GNOME and stuff.. i HAVE googled it, but it was nothing good there.) I also know that Elive has a good window manager, but i want to modify it a little. Do you guys know a good way to start, or a good website with resources i can use?

Elemecca 01-26-2010 12:48 AM

Elive uses the Enlightenment DR17 desktop environment. It is under active development and I'm sure they would welcome additional help. Go have a look at the Enlightenment project page.

Elemecca 01-26-2010 12:55 AM

XFCE is another DE that's lighter than GNOME and KDE but heavier than Enlightenment.

Xmonad, wmii, FVWM, Fluxbox, and Openbox are all lightweight WMs. I personally prefer Xmonad.

rob.rice 01-26-2010 08:58 AM

use the force read the source !

i92guboj 01-26-2010 08:58 AM

macrosoft1, for the sound of your post it looks to me more like you want to start building your own distribution and tuning a bit your desktop. Maybe by reusing some of the already existing WM's around and changing the defaults, decorations, maybe theming it and choosing a set of default applications that will fit well together.

To build your own distribution you should first start here: http://www.linuxfromscratch.org/

If you truly mean to program your own WM, then you will need a bit of experience first, including but not limited to: xlib, your language of preference (C, C++, python, lua, haskell or whatever you like), probably a widget toolkit though that's not strictly necessary (like Gtk+, Qt, the evas framework and all that Enlightenment stuff, wxgtk... again, what you like best).

You probably also want to take a look at the ICCCM and the EWMH if you want your WM to be useful for someone besides you, so the rest of the applications and components will communicate graciously with it and cooperate instead of fighting for the control.

There are simple WM's if you want to take a look at their code as a start: windowlab, ratpoison, aewm, larswm, evilwm...

macrosoft1 01-26-2010 10:28 AM

I guess i am dropping the idea of creating the distro and just using an existing one, and then modify the source for it so it uses my own (written myself or just modifying another one) WM. i do not have so much coding experience, but i can do a little C++(i guess that includes C too). Is there any WM that is rather easy to modify? i am also planning to use a modified version of awn for the taskbar system. i also have an idea of creating a new "start menu" thing. it is going to be curved :/ i think that is difficult. also, i am running a Sabayon inside VirtualBox on my Windows 7 machine, is developing stuff okay on a virtual machine, or should i use another (pretty old) computer?

i92guboj 01-26-2010 10:47 AM

Quote:

Originally Posted by macrosoft1 (Post 3841116)
but i can do a little C++(i guess that includes C too).

That's one of the common sources of trouble. Sure that C and C++ share a lot of concepts, however as much as they relate they are not the same thing. Not even twin brothers are the same person.

Quote:

Is there any WM that is rather easy to modify?
That depends entirely on your background, knowledge of the language and involved components, and of course the size of the base code. I already enumerated a few very simple WMs above, with a small code base.

Since you already know a bit of C++, you might want to look into this one: qlwm.

http://www.alinden.mynetcologne.de/qlwm/

It's based on the Trolltech's Qt toolkit, which is written entirely in C++. Using Qt you can write very functional programs with a relatively low amount of code lines. But don't be fooled: writing a WM is not going to be a piece of cake if you have no previous experience with the involved pieces (X, Qt in this case and the relevant protocols). However, hacking into an existing WM like qlwm is perfectly possible, as a learning exercise.

Quote:

i am also planning to use a modified version of awn for the taskbar system. i also have an idea of creating a new "start menu" thing. it is going to be curved :/ i think that is difficult.
You can do whatever you feel is right. However I advice you to concentrate in one objective at a time. A Window Manager is a piece of software that's used to manage windows. That's what you should be looking at. Fancy things, panels, icons, menus and taskbars come later, once you have sorted the main goal. Plus there are standalone tools that can do that for you, so you can use them while you are developing the core of your WM.

Once you have the core WM component working at least at a basic level, then you can worry about the rest. About the curve thing, you will probably want to research about "shaped windows" in X.

Quote:

also, i am running a Sabayon inside VirtualBox on my Windows 7 machine, is developing stuff okay on a virtual machine, or should i use another (pretty old) computer?
There's nothing wrong with that, as long as all the involved components work "OK" under your VM. Things like compositing (for true transparency and effects) might be a problem if your VM can't do direct rendering via hardware though. Compile times will be longer if your CPU and the size of your RAM are not up to the task. However, I presume the code base of your project will be small, so that shouldn't be a problem except for the initial setup (installing the Qt and X development packages might require long compile times, but that should be just once).

macrosoft1 01-26-2010 02:09 PM

Quote:

There are standalone tools that can do that for you, so you can use them while you are developing the core of your WM.
Is it like GTK+ and that stuff? Or an you give some examples?

Quote:

However, hacking into an existing WM like qlwm is perfectly possible, as a learning exercise.
Yes, i have downloaded it now. Do you think i should just sit down, and study the source code for a while and see if i can understand most of it?

And, it was a GREAT answer you gave me there :D

i92guboj 01-26-2010 02:47 PM

Quote:

Originally Posted by macrosoft1 (Post 3841379)
Is it like GTK+ and that stuff?

No. Gtk+ is a toolkit. A library of widgets that you can use to build applications.

Quote:

Or an you give some examples?
Of course.

Panels:
Desktop icons:
Menu/App launchers:
There are lots more. These are just some examples of tools that you can use to build your desktop, and concentrate on programming your window manager without having to worry about the rest of components while you are on the initial stage. You might want to take a look at the LXDE project as well, which integrates a lot of components like these to form a complete (though minimalist) desktop environment.

Quote:

Yes, i have downloaded it now. Do you think i should just sit down, and study the source code for a while and see if i can understand most of it?
If you are determined to use C++ and Qt as your development framework, you should probably start by doing the Qt introductory tutorials on the Trolltech web site. Then start hacking a bit into qlwm, and try to understand how it works. You might as well look around on their site and see if there's a forum, a mailing list or something similar where you can ask the developers if they are interested in some collaboration. That's usually an easier way to get some experience on WM programming.

macrosoft1 01-27-2010 11:26 AM

Thank you very much.

One last question, and then this post is done.
I have done some research on the Internet, and then i found something called SUSE Studio. Is that a good site for creating a custom distro where i basically just want to change the WM and packages to install?

i92guboj 01-27-2010 11:38 AM

Quote:

Originally Posted by macrosoft1 (Post 3842436)
Thank you very much.

One last question, and then this post is done.
I have done some research on the Internet, and then i found something called SUSE Studio. Is that a good site for creating a custom distro where i basically just want to change the WM and packages to install?

So it seems for the look of their web site. But I have never heard of it, and I definitely never tried it. However don't expect to learn much about distro building if you follow that path.

macrosoft1 01-27-2010 01:02 PM

Ok. But i think it will be too complicated for me to write a WM AND a distro.
Again, thank you very much. You really helped me out :D

ricgal 08-14-2014 11:20 AM

Thank you for this thread
 
This thread is a good start to understand what goes into a window manager. Thank you for the questions and answers.


All times are GMT -5. The time now is 09:04 AM.