GNOME – How to Control the Startup Sequence

What’s the most popular desktop? How does it start?

What GNOME Needs to Get Started, the Values ​​You Want to Provide …

From the beginning and with small systems, you will be putting values ​​in ~ / .xinitrc. The simplest file will simply contain “exec gnome-session”. A more sensible file would look like the one shown below.

export XDG_MENU_PREFIX=gnome-
exec gnome-sesson

Using this approach is not the default. This approach assumes only one choice of desktop environment. This assumption is no longer valid for most systems. Currently the distributions use a display manager, since GNOME is the default desktop, they chose GNOME’s own GDM3 as the display manager. On most systems, you start with GDM3 and have a control file that configures everything.

Where to start with GDM3?

If you were using a regular distribution, gdm is already installed and a default login. You might want to switch to other display managers, SDDM is a popular option. To install it, you use your package manager. At the end of the installation, you will be asked to choose which manager you want to use. The script installs the correct manager for your next boot. If you want to switch back, just run the command below.

$ sudo dpkg-reconfigure gdm3

The same menu will appear and you can choose which one you want to run without deleting any of them. What is happening is that the text line in the / etc / X11 / default-display-manager file changes to point to the correct display manager. On systemd machines, the display-manager.service makes sure it starts up and keeps running. A daemon named logind is a generic daemon that you can check with systemctl.

$ systemctl status systemd-logind.service

GDM3 reads /etc/gdm3/custom.conf to get the correct configuration. In this file, you can configure your system to log in automatically. You can also set xdmcp options and security settings. You can also enable debugging in this file from here.

After launching GDM, you are greeted by a login page. On this page, you can choose which desktop environment you want to use. This choice comes from files in usr / share / xsessions. One example is the Ubuntu default example shown below.

Values ​​in GDM – The session desktop file is an init style file as shown below. Records manage the session by setting values ​​for the desktop.

[Desktop Entry]
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --systemd

There are many parameters in this file, the main ones being Exec and TryExec. The first one launches the desktop in this gnome-shell file. The second checks if the binary exists. Using the TryExec statement, you can force GDM3 to ignore the entry if it does not exist.

Another important file is /usr/share/gnome-session/sessions/gnome.session. This file explains what software is required for this session.

How do I change my own desktop?

Once you have selected GNOME, gnome-session starts searching for multiple files. In the $ XDGCONFIGHOME / gnome-session / saved-session directory, gnome should have saved the last session.

To make certain applications start when the desktop starts, you can add them to the autostart directory. They are listed below.

usr/share/gnome/autostart & ~/.config/autostart/

You can also set the same values ​​using the built-in tuning tool.

The component that launches your desktop, the graphical part, is gnome-shell. Gnome-shell reads data from the gnome session file. Any applications are available in usr / share / application. Information about applications and mime types is available in the usr / share / application-registry directory.

gnome-shell the graphical shell

Gnome-shell creates everything for your desktop, system settings are in usr / share / gnome *. You can also find settings for many gnome applications here. For your personal settings, they are in ~ .local / share / gnome-[Name of app] for specific applications.


There is a lot going on when GNOME starts up. It is good to have a basic understanding of this process so that you can either solve problems or customize how it works according to your preferences.

Related Posts