Sponsored Content
Top Forums Programming Requesting general advice about window manager development Post 302988575 by bakunin on Wednesday 28th of December 2016 03:37:15 PM
Old 12-28-2016
Quote:
Originally Posted by SirSalt
I searched the forum for "window manager" before I started this topic, but I didn't find any results that seemed relevant. I think I did find a topic on X.
For instance here or here, but i will try to explain it again:

X-Windows is a client-server system, like NFS, telnet, ftp, etc.. It deals with providing (graphical) UIs for remotely run applications over the network. Here are its parts:

The most important part is a certain protocol - the "X-protocol" (TCP, port 6000), over which the messages of participating network nodes are exchanged. It is based on TCP and operated on top of it.

Next, there is a "server" part: an "X-server" is a "driver" for a graphics card, along with a (network-aware) library of graphic primitives clients can use (the "Xlib"). X-servers are developed for a certain kind of graphics equipment (with PCs this is usually a graphics adapter but there have been much more sophisticated equipments out there) and provide the means to switch the managed screen to graphics mode as well as perform all sorts of functions ("graphics primitives", i.e. "draw rectangle", etc.) on this screen. All these functions can be requested by X-clients using the servers services over the network. Note, that the "X-server" runs on the "client"-system, which has caused (and still causes) endless confusion among the users of X, even though it is absolutely logical. Examples for X-servers are the things you can download from X.Org or "Opentext Exceed" (the former "Hummingbird Exceed"), which is an X-server for Windows-systems.

What the X-server also does is to manage one or more "keyboard"s and one or more "pointing device"s (usually a mouse, but other things, i.e. trackballs, laser pointers, etc. are also possible). Note that there does not need to be a 1:1 relation between real existing hardware and these virtual constructs (although there usually is).

Now, that we have established the server part and the means of communication we look at the clients: X-clients are the programs which start, connect to a certain X-server and then use that to display their UI. These programs can run on all sorts of systems, even on the local system where the X-server is running too. This is the mode desktop systems are working in: they start an X-server to manage the display, then some X-clients to make use of the sevices the X-server provides. Examples for X-clients would be Firefox (for web-browsing), "xterm" (for commandline-sessions), etc..

A (very special) X-client is the so-called "Window Manager", which is usually the first X-client you start after having started the X-server. You see, X-clients display their UI in so-called "windows" - rectangular portions of the display the X-server gives them. If you start several such X-clients chances are you might want to switch the focus from one such window to the other, resize it, put one after the other into the foreground, overlapping the others, etc.. For these things there is the Window Manager, which does exactly that: first, it decorates each window with a frame, by which it can usually be resized (click on the border, then move the pointer while holding the button down). Second, it adds a title bar to the window, which usually also provides a menu of its own, a means to move the window, etc.. All these things are basically commands to the window manager which does these things without the application itself being aware of them. If you have one window in front of another and want to get the other in front the window manager will give the appropriate commands to the X-server (which in turn will really do the work by redrawing the parts of the screen which need to be redrawn).

This, in fact is what a Window Manager does. Desktop Evironments do something else: they manage your environment, not only your graphical display. They will provide all sorts of panels, preferred applications for some types of files (i.e. when you click on a text document and your favourite word processor comes up with this document loaded - this is the desktop enviroment at work), etc.. Some of its functions overlap with the functions of a window manager which is why they either incorporate their own minimalistic one or use some WM specifically designed for the use with them: metacity, for instance.

I have to admit, personally i detest desktop environments and it is one of the more sore points of my usage of Linux that - realistically - you have to use one of these DEs, otherwise the system is not usable as a work environment. Things like WLAN management, audio options, etc. are only provided as "applets", not as real X-clients, so they work only within some sort of DE but not outside. If i want a system where the function is so tightly tied to the presentation i could use Windows where this kludge is standard. Still, this is just my personal opinion. For reference: my preferred work environment and how it looks like.

Quote:
Originally Posted by SirSalt
Since my end goal is, in fact, a DE, in your opinion, should I disregard the advice this person gave, and actually start with a DE instead? And if so, are there any that you feel are more worthy of starting with? CDE, since it's a traditional DE based on Motif?
As i said above: these two are different things. I understand it might be valuable to know how a WM works so it will not be in vain to try that first, but in fact i think the two are too different to really compare.

Quote:
Originally Posted by SirSalt
but this site's spam-fighting policy prevented me from providing a link
Yes, but that will be quickly over. we found (over years of manually fighting spam - believe me, i am one of the moderators who fought that battle) that it helps greatly to put a lower limit on the right to post links as spammers usually only create accounts and start spamming right away. You may try again after a few more contributions here and you will notice that you indeed are allowed to post links like all the others. That is one of the reasons we can keep this sites information-to-noise ratio so high. Otherwise you would have to wade through several pages of fake viagra advertisements (and postings of similar technical merit) to get to the technical stuff.

Ah, and by the way: i have left out some less relevant parts of the X-Windows system above: font servers, authentication mechanisms, etc.. There is much more, but to understand the basic workings these things can be safely left out. Have fun learning more and more of it.

I hope this helps.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
 

7 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Window Manager of the ... Choice

Inspired by Window Manager of the Year threads from LinuxQuestions.org Like these: 2002 | 2003 | 2004 | 2005 | 2006 I wonder what WMs are used by UNIX people ... People sometimes select diffrent WMs for (old and slow) laptop and (overpowered) workstation, that is why poll allows multiple... (8 Replies)
Discussion started by: vermaden
8 Replies

2. Programming

How to override Window Manager placement of windows.

Hello, everyone! Is it possible to create a window in X11/WM, but override the position Window Manager sets for the window. I'm not sure how to use 'override_redirect' flag, and what to do in order to use it. But the problem with the flag is also that it probably will disable all decorations... (2 Replies)
Discussion started by: AOne
2 Replies

3. Shell Programming and Scripting

Determining window manager from command line

How to know what is my window manager from Linux command line? ---------- Post updated at 02:46 PM ---------- Previous update was at 12:07 PM ---------- How to determine the display manager from command line? (1 Reply)
Discussion started by: proactiveaditya
1 Replies

4. UNIX Desktop Questions & Answers

slim window manager for a thin client

hi I'm looking for a slim and quite comfortable window manager for a unix/linux thin client? (5 Replies)
Discussion started by: ccc
5 Replies

5. UNIX Desktop Questions & Answers

Slimmest Window Manager

Hi Which is the absolutely slimmest window manager Window Manager? THX (3 Replies)
Discussion started by: ccc
3 Replies

6. Red Hat

Window manager on Fedora

Hi eveybody, I want to install fedora on my personal laptop, but I dont want to use any graphical desktop environment, this way i will force myself to learn more. I want to install wm2 which i used to work with it on debian a couple of yeras ago, so is there any instruction that how I can do this?... (3 Replies)
Discussion started by: messi777
3 Replies

7. Fedora

Window Manager

Hi guys, I want to get back to my old days and re-obtain my unix skills, I remember I installed a window manager wmii / wmii2 /mwm on my debian and started to learn unix/linux and now after some years not touching it and having to deal with gnome on redhat (because of my work) I feel like very... (6 Replies)
Discussion started by: messi777
6 Replies
All times are GMT -4. The time now is 06:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy