First of all, a Display Manager (or DM, e.g. xdm, gdm, kdm) is not the same as a Desktop Environment (or DE, e.g. GNOME, KDE, XFCE).
The Display Manager takes care of graphical login, and decides (or lets you choose) what session to run. Or what session*s* in case you choose the "switch user" menu option.
A Desktop Environment is basically a collection of programs (display manager, window manager, session manager, panels, configuration tools, etc.) and libraries (e.g. Gtk) that intend to give a consistent and integrated environment to work in.
A Window Manager manages windows: where to place them, move them, resize them, minimize/maximize them, tile them, etc.). It also handles the shortcuts to do those things. In some cases the window manager also paints the borders of windows, in other cases this task is off-handed to a "window decorator".
The "Run Application" dialog in GNOME is part of gnome-panel
, but in another DE it could be another part of the environment.
Who is in charge of painting windows etc. depends; in case there is a "compositor" in use (often part of the window manager, e.g. in Compiz) then the compositor paints the windows on the screen, otherwise (as was usual in the past) it's the X-server doing that.
The Main Menu(s) are put on the screen by a part of gnome-panel, but the data used comes from a bunch of files in /usr/share/applications/
(possibly combined with an equivalent directory in your home for personal changes). Those files have a structure defined by FreeDesktop.org (a platform for different DEs to collaborate on common infrastructure), so that GNOME and KDE know about the same programs (but still can show them differently, and in some cases prioritize "native" programs over "foreign" ones).
And yes, different users can use a different session configuration (and can even define their own ones). In GDM, try the Session drop-down for the available choices.
Furthermore, it is possible to mix & match several components, but that will sometimes result in less cooperation and a loss of "smoothness" in how things work. One very well known example where things get exchanges is of course Compiz, which replaces Metacity if you want fancy desktop effects. But there are lots of other changes possible.
The only chance I see is configuring xkb to map your keys accordingly.
A few applications like games might directly listen to the actual keys pressed, but usually everything else uses just the xkb mapping.
There are two different tools for configuring: setxkbmap
and xmodmap
.
In theory xmodmap is deprecated and should be replaced by setxkbmap, but sometimes good old xmodmap is handy, too.
You are limited to the features supplied by xkb, but even xmodmap supplies a limited set of modifiers. You can specify four keysyms for each key. To quote it's man page:
The first keysym is used when
no modifier key is pressed in conjunction with this key, the
second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and
Shift keys are used.
Maybe it is a good idea to read more on the details of the system. I would suggest to read here or here to see what is possible.
Best Answer
Update 1
I believe the feature you are looking for is actually X Window multi-pointer.
From ArchLinux Multi-Pointer X Introduction:
Check out following links
Original Answer
I saw various of those setup in the past (in term of years). So it is definitly doable. No need to re-write kenrel or x windows.
Doing a google search with
linux multiple mouse pointers
, come up with multiple pages. Following is one of themThose are only 2 of many that come up.
If you search for
linux multi-seat
, you will get links for one linux box supporting multiple KVM (keyboard+video+mouse). Following is one of themSo the technology is definitely already available, but how far you can go, or how they suit your need, you will have to spend sometime to research and experiment.