Monday, June 18, 2012

Unix DE, WM and DM. Do you know what yours are?

If you run a Unix system like Linux or FreeBSD, you almost certain are using a Desktop Environment , a Window Manager and perhaps a Display Manager too.
Even Windows uses these.
That is unless you prefer to do all of your work in a text based TTy.

The DE is essentially the GUI. Read about it here. Examples are Gnome, KDE and LXDE.

Windows Managers are what provide the detailed control of the windows you use within the DE. More detail available from Wikipedia here. Examples of WM's that I've used are Metacity, Compiz and OpenBox.

You may also be using a Display Manager that may otherwise be known as a login manager as this is what you use to log into your system as well as start up the X-Window system. As ever more detail is available from Wikipedia.
Examples are GDM, KDM and LightDM.

But, how can you tell which, if any, of these you are using?
All can be found from the command line as follows:


 wmctrl -m | grep "Name" | cut -c7-
for which you probably need to install wmctrl which is available in most Linux distor repos and also in FreeBSD ports.
The DM should be listed in the file  /etc/X11/default-display-manager.

Using the above information, I was able to make an addition to my on-screen Conky in Ubuntu, Arch, Mepis and FreeBSD 9.0 to identify all three managers as well as the kernel currently in use.
How it looks is shown in the screenshot (which is for Ubuntu 12.04) and the conky code used is as follows:

Kernel: ${alignr}${exec uname -r}
Desktop Environment: ${alignr}${exec echo $DESKTOP_SESSION}
Window Manager: ${alignr}${exec wmctrl -m | grep "Name" | cut -c7-}
Display Manager: ${alignr}${exec cat /etc/X11/default-display-manager}

No comments:

Post a Comment