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

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

GNOME System Monitor

System monitoring software are some of the most important tools you need at hand. These tools allow you to monitor the...
29/12/2020

Installing GNOME Desktop Environment on Debian 10 Minimal Server

GNOME desktop environment is many peoples favorite desktop environment. On Debian 10 Buster, GNOME 3 desktop environment...
29/12/2020
Bài Viết

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

Thuê mua proxy V6 uy tín, chất lượng tại đâu?
11/05/2024

Tổng hợp mẹo thuê mua proxy Tiktok đạt hiệu quả cao
11/05/2024

Thuê mua proxy xoay ở đâu uy tín, chất lượng, giá tốt?
11/05/2024

Nâng cao trải nghiệm trò chơi khi thuê mua proxy game tại Onet
10/05/2024

Thuê mua proxy Airdrop tốc độ nhanh, hiệu quả cực tốt
10/05/2024