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.
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.
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
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.
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
.
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:
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.