Introduction to GNOME Session

The GNOME Session package contains the GNOME session manager.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

GNOME Session Dependencies


elogind-246.10, gnome-desktop-43.1, JSON-GLib-1.6.6, Mesa-22.3.5, and UPower-1.90.0


xmlto-0.0.28, and libxslt-1.1.37 with docbook-xml-4.5 and docbook-xsl-nons-1.79.2 (to build the documentation)

User Notes:

Installation of GNOME Session

When running GNOME under Wayland-1.21.0, environment settings are not imported for the user using the system profile. The Wayland developers are currently undecided on a standard method to provide system environment settings for user sessions. To work around this limitation, execute the following command to make gnome-session use a login shell:

sed 's@/bin/sh@/bin/sh -l@' -i gnome-session/

Adapt so that gnome-session can build without systemd:

sed -i "/  systemd_dep/,+3d;/if enable_systemd/a \    systemd_userunitdir = '/tmp\'"

Install GNOME Session by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr           \
      --buildtype=release     \
      -Dsystemd_journal=false \
      .. &&

This package does not come with a test suite.

Now, as the root user:

ninja install

Move the documentation to a versioned directory:

mv -v /usr/share/doc/gnome-session{,-43.0}

Now, as the root user, remove systemd units that are useless on SysV systems:

rm -rv /tmp/{*.d,*.target,*.service}

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.


Installed Programs: gnome-session, gnome-session-inhibit, and gnome-session-quit
Installed Libraries: None
Installed Directories: /usr/share/doc/gnome-session-43.0 and /usr/share/gnome-session

Short Descriptions


is used to start up the GNOME Desktop environment


is used to inhibit certain GNOME Session functionality while executing the given command


is used to end the GNOME Session