Benjamin Berg (), one of the engineers at Red Hat working on GNOME development, the results of the work on transitioning GNOME to session management exclusively using systemd, without the gnome-session process.
For a long time, login management in GNOME has utilized , which tracks session states related to users, manages session IDs, handles switching between active sessions, coordinates multi-seat environments, configures device access policies, provides means for shutdown and sleep, and more.
At the same time, some session-related functionalities remained with the gnome-session process, which managed D-Bus communications, launched the display manager and GNOME components, and organized the auto-start of user-specified applications. In the development process of GNOME 3.34, gnome-session-specific capabilities have been formalized as unit files for systemd, executed in 'systemd --user' mode, i.e., tied to the environment of a specific user rather than the entire system. Changes have already been applied in the Fedora 31 distribution, with its release anticipated at the end of October.
The use of systemd has enabled the organization of on-demand handler launches or upon the occurrence of certain events, as well as more sophisticated responses to premature process terminations due to failures and enhanced dependency handling when starting GNOME components. As a result, the number of constantly running processes can be reduced, and memory consumption lowered. For example, XWayland can now be launched only when an application based on the X11 protocol is executed, and hardware-specific components can be initiated only when such hardware is present (e.g., smart card handlers will start upon card insertion and stop when the card is removed).
Users now have more flexible tools for managing service launches; for example, to disable the multimedia key handler, it is sufficient to execute "systemctl --user stop gsd-media-keys.target". In case of issues, logs related to each handler can be viewed using the command journalctl (for instance, "journalctl --user -u gsd-media-keys.service"), after enabling debug logging in the service ("Environment=G_MESSAGES_DEBUG=all"). There is also now the possibility of launching all GNOME components in isolated sandbox environments, which have increased security requirements.
To smooth the transition, support for the old method of starting processes will be maintained for several development cycles of GNOME. Subsequently, developers will review the state of gnome-session and are likely to remove the process launching tools and D-Bus API support from it. Then, the use of "systemd --user" will be mandated, which may create difficulties for systems without systemd and will require the preparation of an alternative solution, similar to what was done with . Nevertheless, in his presentation at the GUADEC 2019 conference, Benjamin Berg mentioned the intention to maintain support for the old launch method for systems without systemd, but this information contradicts the plans for .

Source: opennet.ru
