Methods of payment Abuse

Starting the Ubuntu graphical shell

09.07.2024, 20:39

You may be running the system in text mode, or it may be a server that is to be run via terminal. Provided it already has a graphical environment installed, there are several ways to start the Ubuntu graphical shell. Next, let's take a look at all the different techniques.

What is a graphical shell

A graphical shell (or GUI, Graphical User Interface) in Linux is a graphical environment that allows users to interact with the operating system using graphical elements such as windows, buttons, menus, and so on. A graphical shell provides a convenient and intuitive way to control a computer.

In the Linux world, there are several popular graphical shells such as GNOME, KDE, Xfce, Unity and others. Each of them has its own features, style and set of applications. Users can choose between different graphical shells depending on their preference for usage and appearance.

A graphical shell makes working with Linux more accessible to users, especially those who prefer interacting with the computer through a graphical interface instead of the command line.

How to run the graphical shell

First of all, we need to look at the startup level in systemd. To do this, run the following command:

$ systemctl list-units --type target | egrep "eme|res|gra|mul" | head -1

Текущий уровень запуска в systemd.

You need to get the startup level graphical.target and if you haven't gotten it, then you can fix the situation by typing:

$ sudo systemd isolate graphical.target

After executing the command, the startup level will be changed to graphical , and then the shell will start automatically.

To start the manager manually, run the command:

$ sudo systemctl start display-manager

This command launches a special manager, with which you can specify a login and password, and then launch the graphical shell.

There is another command that allows you to solve this problem. It is called startx. However, for this command to work in the ~/.xinitrc file you need to specify the name of the shell you need, because it can be Openbox, Fluxbox, i3wm.

Type:

$ vi ~/.xinitrc
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
feh --bg-fill ~/Загрузки/52453-sklon_holm_cerkvushka_sneg.jpg &
lxpanel &
exec openbox-session

From this you should know that the if block loads all configuration files from the /etc/X11/xinit* directory, while the line with feh adds the desktop background, lxpanel & adds the bottom panel, and by specifying exec openbox-session starts openbox directly.

Запуск из консоли TTY

Note that the shell can only be started from the TTY console, from a terminal in a graphical environment this will not work

Launching the Ubuntu graphical shell from the console is done with the command:

$ startx

As you can see, nothing complicated. The shell will start in the same terminal in which you executed startx.

Why the graphical shell does not start

There are a number of reasons why the graphical shell may not start in Linux. Here are some of the most common reasons and how to fix them:

  1. Graphics driver problems: if you are having problems with your graphics drivers, this can prevent the graphics shell from starting. Make sure you have the correct drivers installed for your graphics card.
  2. Not enough hard disk space: If your computer is running out of hard disk space, this can also cause problems with the graphical shell launching. Free up disk space to fix this problem.
  3. Software conflicts: sometimes conflicts between software can cause problems running the graphical shell. Try to identify possible conflicts and fix them.
  4. Error in configuration files: Incorrect settings in the configuration files of the graphical shell can cause it to not work. Check the configuration files for errors.

After an operating system upgrade, you may have problems running the graphical shell due to incompatible software versions. Try performing a system update or rolling back changes.