There are certain apps that you want to ensure that users don't accidentally remove from their session. Eg, the panel, metacity, etc.
../NewGnomeSession will have support for "required components", as follows:
/desktop/gnome/session/required-components is a list of required components. The default value is [windowmanager,panel,filemanager].
After reading in the session (from the default session dir, autostart dirs, and the user's saved session), the session manager will check for an "X-GNOME-Provides" key in each .desktop file, looking for the required components. metacity.desktop will have X-GNOME-Provides=windowmanager, gnome-panel.desktop will have X-GNOME-Provides=panel, and nautilus.desktop will have X-GNOME-Provides=filemanager. Apps which are intended to fully replace any of those apps would be expected to also include the X-GNOME-Provides key. (So compiz.desktop would include X-GNOME-Provides=windowmanager, and gimmie.desktop would include X-GNOME-Provides=panel.)
If a component "foo" listed in required-components is not Provided by any .desktop file, gnome-session will check the key /desktop/gnome/session/required-components/foo, which should contain the name of a .desktop file (not including the path or .desktop), which will then be added to the session to fulfill the requirement. So, eg, if there was no panel in the session, gnome-session would look at /desktop/gnome/session/required-components/panel, see that its value was gnome-panel, and would then look for gnome-panel.desktop to add that to the session.
In the Session capplet
If the user tries to remove an app from startup that provides a required component, the session capplet will first check if there is any other startup item that also provides that component. If there is, then the user can remove the original component. (So given the examples above, the user would be able to remove metacity from the session if he added compiz first.)
If the user tries to remove a required app when no substitute is available, the session capplet will explain that this is probably a bad idea. Something like:
- The application 'GNOME Panel' is a necessary component of the GNOME Desktop: It provides the bar at the top or bottom of the screen containing menus, the window list, status icons, the clock, etc. Disabling it may make your system unusable. Are you sure you want to do this?
The explanatory sentence in the middle ("It provides...clock, etc.") is the long description of the relevant key in gconf (eg, /desktop/gnome/session/required-components/panel).
If the user chooses to remove it anyway, the capplet will remove it as with any other startup item, and then edit the required-components key to remove that item, so that gnome-session won't just add the component back in the next session.
System administrators may want to add additional local required components.