June 22, 2007 12:38 PM   Subscribe

GDM KDE GNOME KDM XDM XFCE ARGH! Logon manager? Window managers? KDM that can load GNOME? I am so confused on this topic of the differences and how they all fit together. Can someone point out some good things to read on the topics? Something that ties it all together?
posted by tcv to Computers & Internet (15 answers total) 5 users marked this as a favorite
Login managers != window managers.

Login managers handle authentication. From there, they start whatever window manager you tell them to.

The only reason it makes sense to use like login managers is libraries. Each one will probably depend on libraries that the window mangers will come with. So, if you don't want to waste a bunch of disk space, don't use (example) KDM with Gnome, because then you'll have a bunch of KDE libraries that are otherwise unused taking up disk space.

Otherwise, absolutely nothing prevents you from using KDM with Gnome, XDM with KDE, etc, etc.
posted by onedarkride at 12:49 PM on June 22, 2007

What onedarkride said.

The logon manager doesn't matter much, as long as it has the ability to load whatever window manager(s) you want, and most do.

As far as window managers, the typical linux user is either on Gnome or KDE. My suggestion is to have both available to you, as invariably you will find window manager specific apps from both that you want. FYI, you can run KDE apps while using Gnome, and vice-versa. You just have to install both desktops.
posted by mcstayinskool at 1:00 PM on June 22, 2007

GDM, XDM, and KDM -- all start X and give you a login screen. Then, they dump you into an X session. They are "Display Managers." They keep X running before you log in and after you log out. (X is the code that connects your mouse, keyboard, tablet, et c. and provides a graphical environment for apps to connect to.)

An X session may be managed by KDE or GNOME or XFCE or others, or nothing at all. KDE and GNOME are efforts to make libraries of functionality so that apps written with them work together in some ways.
posted by cmiller at 1:01 PM on June 22, 2007

One more thing, because I can see it confuses you: Apps written to use KDE libraries can run along side apps written with GNOME libraries, or no libraries at all (not even xlib). The libraries are just toolkits of ways to do stuff, and no toolkit has a kind of monopoly on the system.

Now KDE and GNOME duplicate a lot of functionality and aim to provide everything you'd need, so if you're running one "environment", you probably don't need to use apps from the other environment. You /could/, but they may look strange together.
posted by cmiller at 1:09 PM on June 22, 2007

X-Windows is a generic network-aware windowing system, with which other applications (clients) talk to provide some sort of interface., XFree86, and various other implementations abound; they all use the same protocol, the same language for drawing and interacting with things.

Login managers are simply clients which use X to display a pretty login interface; they're not necessary, but some people prefer them to traditional textmode logins. On login, they "become you" and, generally, run some shell script which runs whatever apps you want in your session.

One of these applications will be a window manager -- basically a client to provide a sensible interface for windows; familiar behavior, borders and buttons, keyboard shortcuts, menus and so forth. Other clients will be file managers, panels, system monitors and so forth, all of which open windows which the window manager will decorate and lay out according to whatever rules it wants to follow. All these applications may or may not interact in special ways; KDE, Gnome and other projects provide various utility libraries and services which can provide them with consistant looks and behaviors beyond the basic window border and control bits the window manager handles. Some higher level standards exist to try to keep these systems all playing nicely with each other.

This... menagerie of libraries and applications flying in formation leads to the environment you see when you log in, and the differing levels of integration and cooperation is why things like drag-and-drop, look-and-feel and even cut-and-paste can be hit-and-miss.
posted by Freaky at 3:37 PM on June 22, 2007

Others have already said this, but I'll repeat some of it in case my wording happens to make more sense to you. (it very well may not, but the more explanations you have, the more likely that one of them will click.)

The very first thing that runs is the actual X Window System, mostly called 'X'. It's just a set of (very complex) libraries that render graphics onto a screen. It's network-aware. It always runs locally, but it can allow programs to display from remote computers. An X Window System is called a 'server', because it serves requests by clients, which are programs. In X, the client is the PROGRAM, and the server is what is touching your video card... so if you're using a tiny local system to run programs on a huge mainframe, you're still the server and they're still the clients. That's a little confusing, I realize. :)

The first client that generally runs is one of the DMs. These are fairly simple login programs. All they do, pretty much, is give you a nice prompt for your username and password, and then start your windowing environment of choice. The reason they're written as separate programs is because they're network-aware; you can use the *DM programs to remotely log into another computer over the network. This is a complex enough function (it uses a special protocol called XDMCP) that it was easiest to just write them as fully standalone programs. They have more than one kind, I believe, primarily to give a consistent look. There's no window manager running yet, so they draw all their own windows, and they have to be specially programmed to look like a coherent part of the later windowing environment. KDM looks like KDE; GDM looks like GNOME. But they serve the exact same function, and you can use pretty much any DM program you want, and use it to start any window manager you prefer. It looks a little weird to log into GDM and see KDE start, but it works just fine.

Once you've correctly identified yourself to the *DM program, it starts your actual window manager. This is a program with special privileges to move other windows around. Both KDE and GNOME provide window managers, along with a metric assload of other stuff. They're so central to the experience that most people don't differentiate the window manager from the environment; the KDE window manager IS KDE to most people, and likewise for GNOME. There's a lot of other stuff too, but this is what folks pay attention to.

Like with the DM programs, you can use any window manager with any X Window program, as far as I know. You could potentially run into issues with conflicting window decorations in some cases, I believe, but I've never seen it. The KDE window manager, for example, will handle GNOME applications just fine, as well as the older X-Window programs that don't use their display libraries.

If you run apps from both KDE and GNOME at the same time, you end up loading and running most of the libraries for both systems at once, which uses more memory than normal. If you're on any kind of memory-constrained system, you may prefer trying to stick with the apps from just one windowing system. If you've got lots of RAM, though, don't worry about it... just run whatever you like.

There are also simpler window managers available, if you don't like how KDE and GNOME handle the problem. XFCE is one of those, I believe, as is 'fluxbox'. There are quite a number of alternatives. They should, for the most part, just work.

These days, I let other people worry about this stuff, and use whatever's provided. I tend to like KDE because that's what I know, but use whatever you prefer. If you have any kind of good distribution, you shouldn't NEED to think about this stuff at all any more... you should just be able to install programs from your distro's package management.
posted by Malor at 4:34 PM on June 22, 2007

Response by poster: Thanks, guys. Each one of your answers helped in part.

I can tell you a little about why this came up. Not too much detail, I hope.

Over the course of getting Firefox in Ubuntu to correctly work with streaming media (MP4, WMV, etc.), I ran into a problem which has since been filed as a bug at Ubuntu. They're looking at it now and one of the questions they posed to me was: Can you try it in kdm?

I had presumed until that point that "kdm" meant "kde." Not knowing what to do, really, I just used synaptic to install Kubuntu-desktop which brough in kdm and kde. I login to a text prompt anyway. From there I start gdm or kdm. So, I logged in after kubuntu was installed, then "sudo kdm start" and up came a login prompt. I use it switch back and forth between Gnome and KDE, which I understand now are WINDOW managers.

Now, as you guys said, I suppose I'm using up more memory than I need to here with both sets of libraries, but since I am going back and forth, I suppose I need it! ;-)

So, I think I got it!


posted by tcv at 5:04 PM on June 22, 2007

KDE and Gnome are desktop environments. They're a collection of standards and libraries, and a suite of applications intended to have a reasonably consistent user interface, and to work well together. They're the big two in the Linux world, then there's XFCE and Enlightenment (well, maybe: Enlightenment's devs call it a "desktop shell") and a bunch of others.

KDM and GDM are the default display managers, i.e., X-based login managers, for KDE and Gnome, respectively. There's also Entrance (Enlightenment), XDM, Slim, and more.

Desktop environments include a window manager, which determines what exactly you see when an application opens a window, and usuially offers a user interface to manipulate the windows -- moving them, minimizing them, maximizing them, closing them. Gnome's default WM is Metacity; KDE's is Kwin. You could probably use one of those as your WM without installing the whole DE, but I haven't heard of anyone doing it.You can opt to use a different WM in Gnome if you really feel like it (or at very least it was true fairly recently); you could probably do the same with KDE; few people do.

Many people opt not to use a desktop environment at all, and choose from a huge number of available window managers.

There are a couple of advantages to sticking with a DE and the apps that are part of it. They're designed to let you make system-wide configuration options. If you mix apps from different DE's or unaffiliated apps, you can expect to have to do different things in different places to, for instance, change font sizes.

And the DE's apps share a lot of binary libraries. Running apps from both DE's means more memory usage. I'd be surprised if this made a noticeable impact on a modern system, but if you were on old hardware, you might care (and probably wouldn't be running a DE at all.)

Most well-known Linux distros use KDE or Gnome and its default display manager and window manager; when you install the distro, you don't have to make choices about them -- you'll get one by default. Others use another DE, or none, but install a particular display manager and window manager.

Myself, I start with an Ubuntu command-line system and add X, XDM, and the ratpoison window manager, but I'm a crank.

On preview: let me stress, KDE and Gnome aren't window managers. They include window managers. I suspect the person who asked you to try it in kdm meant to say 'kde.'
posted by Zed_Lopez at 5:24 PM on June 22, 2007 [1 favorite]

'Trying it in kdm' seems ... weird to me. KDM is just a login program. After it's run, it's done, as far as I know. I don't think it has any lasting effect.

But, hey, they're the ones troubleshooting, not me, so I'll just shaddup. Good luck. :)
posted by Malor at 6:16 PM on June 22, 2007

Response by poster: Well, instead of me trying to repeat the entirety of the conversation, let me just give you guys the link to the filed bug and ensuing discussion.

In any case, thanks for clearing it up. I imagine it will take a few tries to get this right in my mind. It's a different way of thinking about things having come from Windows.
posted by tcv at 8:12 PM on June 22, 2007

Ok, that's a tough bug. That's why you're having all the trouble with getting people to look at it... even if it IS their fault, it'll be hard to find, so they're resisting looking at it.

Basically, what happens with the login process is that's it's a chain. Each time an application launches another, it inherits the environment variables that were set in the parent. That means that running 'gdm start' launches GDM with all the environment variables you have set at the command line, and then everything launched subsequently by GDM also inherits that, plus any changes GDM made.

The reason they're asking you to run KDM and XDM is to try to narrow down the problem, but I think they missed one critical thing to try: setting your default runlevel to 5, so you don't log in at the command prompt at all. Log in directly via GDM instead, and see what happens. If it still breaks, try it with KDM and XDM as well. (I don't have a Ubuntu system handy... if you need help figuring out how to run them, let me know and I'll post back with a better answer tomorrow.)

I'm thinking that a ulimit (user limit) or an environment variable is being set wrong, and by running the command prompt, you're setting it correctly again so that things work in processes you launch from there. Each time you run a terminal, it resets most of its environment variables by loading them from a series of files scattered about the filesystem.

Dropping back to a pure GDM login will give it just the 'system' environment to start with, without any of your user-level settings. This may cure the problem. If it does, keep chasing it down. It could definitely be a system bug. It could also be some kind of bad tweak you've made in your personal .bashrc or .profile.
posted by Malor at 12:42 AM on June 23, 2007

Response by poster: Well, I've honestly not made any tweaks and I don't believe the software I've added does either. For what it's worth, it's reproducible under a LiveCD.

Ubuntu's default login is through GDM and it starts at runlevel 2. If you were to put in a LiveCD in your system and drop to a terminal, you'd see that you're in runlevel2.

I don't really know how to make it switch to KDM or XDM. I can do it if I login via a command-prompt. And since I can reproduce the problem via a command-prompt I think they're okay with that.

Either way, it's getting looked at. But it's taking awhile and I I do have workarounds. :-)
posted by tcv at 5:57 AM on June 23, 2007

I don't really know how to make it switch to KDM or XDM.

You can edit /etc/X11/default-display-manager.
posted by Zed_Lopez at 10:31 AM on June 23, 2007

Ok, well, I was going to try to help troubleshoot -- you're obviously not logging in via GDM when you're using the startx command -- but since you seem very convinced you've got it handled, I'll drop it there.
posted by Malor at 3:26 PM on June 23, 2007

Response by poster: Hey Malor,

Sure, I'm grateful for the help. I've done a lot of reading over the last couple of days and am getting the hang of things. It's been fun. I've managed to switch to automatically booting into KDM and then into KDE. I've also installed FluxBox and played around with that.

Anyway, I've written you off list to continue if you're interested. Thanks for the offer! I wasn't trying to rebuff your efforts. I just was trying to keep the topic on the original question. ;-)


posted by tcv at 5:49 AM on June 24, 2007

« Older Natural Language Parsing library?   |   Should we get a hedgehog? Newer »
This thread is closed to new comments.