GNOME – How to control the start sequence

29/12/2020

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]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session –systemd
–session=ubuntu
TryExec=/usr/bin/gnome-shell
Type=Application
DesktopNames=ubuntu:GNOME
X-GDM-SessionRegisters=true
X-Ubuntu-Gettext-Domain=gnome-session-3.0

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.

Conclusion

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.

ONET 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, ONET 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

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...
29/12/2020

Gnome Tweak Tool Ubuntu

How to Customize GNOME 3 Desktop Environment on Ubuntu 17.10 Ubuntu 17.10 Artful Aardvark comes with GNOME 3 Desktop pre-installed....
28/12/2020

Install Gnome Maps on Linux

There are a number of apps for checking out your location on the earth. These apps are generally classified as maps that...
29/12/2020
Bài Viết

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

SỰ KHÁC BIỆT GIỮA RESIDENTIAL PROXY VÀ PROXY DATACENTER
17/02/2024

Mua Proxy v6 US Private chạy PRE, Face, Insta, Gmail
07/01/2024

Mua shadowsocks và hướng dẫn sữ dụng trên window
05/01/2024

Tại sao Proxy Socks lại được ưa chuộng hơn Proxy HTTP?
04/01/2024

Mua thuê proxy v4 nuôi zalo chất lượng cao, kinh nghiệm tránh quét tài khoản zalo
02/01/2024