GNOME – How to control the start sequence


Which is the most popular desktop?What makes it start?

What GNOME needs to get started, values you want to supply…

From the beginning and with small systems, you will put values in ~/.xinitrc. The simplest file will just contain ‘exec gnome-session’. A more reasonable file would look like the one below.

export XDG_MENU_PREFIX=gnome-
exec gnome-sesson

Using this approach is not the default way to do it. This approach assumes only one choice of desktop environment. This assumption is no longer valid for most systems. Distributions nowadays use a display manager, since GNOME is the default desktop they have chosen GNOME’s own GDM3 as the display manager. On most systems, you will start from GDM3 and have a control file that sets things up.

Where do you start GDM3?

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

$ sudo dpkg-reconfigure gdm3

The same menu will appear and you can choose which one you want to run without uninstalling any of them. What happens is that the text string in the file /etc/X11/default-display-manager is changed to point to the correct display manager. In systemd machines, the ‘display-manager.service’ makes sure it starts and keep running. The daemon named logind is the general daemon, which you can check using systemctl.

$ systemctl status systemd-logind.service

GDM3 reads /etc/gdm3/custom.conf to get its correct configuration. In this file, you can set your system to login automatically. You can also set xdmcp parameters and security settings. Here, you can also enable debugging in this file.

After GDM has started, you are greeted with your login page. On this page you can choose which desktop environment you want to use. Those choices comes from files in usr/share/xsessions. One example is the default one from Ubuntu, seen below.

The values in GDM – The session Desktop file is an init style file as shown below. The entries control 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

You have many options in this file, the main ones are Exec and TryExec. The first one starts the desktop, in this file gnome-shell. The second one, checks if the binary file exists. Using the TryExec statement, you can have GDM3 ignore the entry if it does not exist.

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

How do you change your own desktop?

Once you have chosen GNOME, gnome-session starts to look around for a number of files. In the directory $XDGCONFIGHOME/gnome-session/saved-session, gnome should have saved the last session.

To have specific applications start when your 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 with the built-in tweak tool.

The component that runs 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 are available in the usr/share/application-registry directory.

gnome-shell the graphical shell

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


When GNOME starts, there is a lot happening. It is good to have a basic grasp of this process, so you can either solve problems or tweak how it works to your own preferences.

Sandclock IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, Sandclock IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Installing Dash to Dock on Ubuntu 20.10 – GNOME Shell Extension for Enhanced Dock

Personalization of setting in Linux distributions is one of the highlighted features. There are tons of themes, icons, cursors,...

How to Install GNOME on Manjaro Linux

Manjaro Linux is one of the finest Linux distros out there that brings the experience of Arch in a very simple manner....

How to Install and Use GNOME Shell Extensions in Linux

GNOME Shell is a popular desktop interface consisting of a panel, an application overview grid, a dock, a system tray and...
Bài Viết

Bài Viết Mới Cập Nhật

Hướng dẫn chuyển đổi windows server windows evaluation to standard và active windows server 2008 + 2012 + 2016 + 2019

How to Update Ubuntu Linux

Squid Proxy Manager cài đặt và quản lý Proxy Squid tự động trên ubuntu

Hướng dẫn cài đặt Apache CloudStack

Hướng dẫn ký file PDF bằng chữ ký số (chữ ký điện tử) và sửa lỗi mới nhất 2021 foxit reader