This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

GnomeSession TNG

Problems and Goals

Problems with the current gnome-session:

The big goals for the rewrite are:

Now started in the new-gnome-session branch of gnome-session in subversion.

Startup

Startup is controlled by .desktop files. The session manager does not have any hardwired startup apps (except gconfd and dbus-daemon, which it needs for its own purposes). The "default session" is just a directory containing a small number of .desktop files to be autostarted.

In "failsafe" mode, the session manager only reads the desktop files from the default session directory. In normal login mode, it also reads desktop files from the system autostart dirs, the user autostart dir, and possibly a saved session.

If an app has an AutostartCondition key in its .desktop file, the session manager checks its value. (See this xdg-list post.) If the autostart condition is false (eg, it points to a gconf key that is unset or false), the app is removed from the list.

Once it has the final list of applications, the session manager starts them in 5 phases: Initialization, WindowManager, Panel, Desktop, and Applications.

An application's startup phase is controlled by the X-GNOME-Autostart-Phase key in its .desktop file. If this is not set, it defaults to the Applications phase. Applications in the first 4 phases MUST signal to the session manager when they are up and running (via XSMP); the session manager won't start the next phase until every app in the current phase has indicated that it is ready. Applications in the Applications phase aren't necessarily expected to communicate with the session manager.

For each application in a given phase, the session manager runs its RestartCommand if it has saved XSMP state or its Exec line if not. If the .desktop file indicates that the application supports startup notification, then that will be used when launching the app.

An additional new form of startup notification is also used; if the .desktop file has an AutostartNotify key set to true, the session manager will set the DESKTOP_AUTOSTART_ID environment variable to a valid XSMP client id when starting the app. The app is then expected to use that client ID if it connects via XSMP. (This helps the session manager figure out which autostarted app each XSMP client corresponds to.)

Once every application in the current phase has been started, the session manager will wait for them all to indicate that they are up and running:

Splash Screen

Having .desktop files lets us show proper icons and localized names for all autostarted apps, rather than only having icons and names for a few hardcoded things listed in gnome-session itself (105557). Also, we can use startup notification on the autostarted apps to have a better sense of when they are done launching (fixing 74508, Splash screen does not wait for and display everything that loads).

People want to be able to theme the splash screen (57151 and dups). There are bugs in bugzilla about keeping the gdmgreeter background through startup (322056 (fixed >= gdm 2.19.x), 355190). The latter suggests moving the login splash screen from gnome-session to gdm, and showing only a progress bar (where the progress information would come from gnome-session).

The splash screen would be started as part of the Desktop phase, and would disappear at some point during the Applications phase (probably immediately after the last startup app was launched; having it stick around until the last apps signal that they are ready seems like the wrong thing, since the desktop may be usable from the user's point of view long before that.)

Running


2024-10-23 11:37