The ultimate solution to Linux’s inability to enter the graphical interface

The ultimate solution to Linux unable to enter the graphical interface

      • 1. General introduction of the situation:
          • 1. Virtual machine related content
        • 2. Encounter related problems
        • 3. Current (ultimate) solution
  • 2. Linux cannot enter the graphical interface
    • 1. According to the error message, abrt-auto-reporting 157……
      • 1. Error when starting up
      • 2. Execute the corresponding command
      • 3. Continue to execute relevant commands
    • 2. Baidu Linux cannot enter the graphical interface. Please refer to relevant articles and perform the following steps.
      • 1. Linux cannot enter the graphical interface solution
        • 1. Go directly to graphics
        • 2. If you want to automatically enter xwindos every time;
      • 2. Solution to the inability to enter the graphical interface (GNOME, KDE, etc.) after Linux installation
        • 1. Question:
        • 2. Solution:
          • The process is as follows:
            • 1. Enter the following command at the command line to install the Gnome package
            • 2. Update the system’s run level
          • There is also a way to set GNOME as the default startup interface (without `ctrl + alt + F1`)
            • 1. Enter the command line mode of cenos7
            • 2. Enter “init 3” in the terminal and press Enter to enter the command line mode.
            • 3. After successful login, use systemctl get-default to obtain the current system startup mode.
    • 3. SMbus Host Controller not enabled
      • environment:
      • question:
      • reason:
      • Possible problems
        • question:
        • Solution
    • 4. yum -list error reporting
      • Refer to “yum -list error reporting” to completely perform the full text operation.
        • question:
        • Solution:
          • 1. Then first check whether the firewall is turned off or not. If it is not turned off, use the following command to turn it off.
          • 2. Secondly check whether `SELINUX=disabled` is Disabled or Permissive. If not, please perform the following operations:
          • 3. If it still doesn’t work, you need to go into the `/etc/yum.repos.d/` directory to view the files.
      • The execution process and results are shown in the figure below
    • 5. Install Gnome packages
      • 1. If it is Ubuntu, do not continue to install yum.
      • 2. When installing the Gnome package, the error message `There are no enabled repos` (There are always more solutions than difficulties!!!) Solution
        • Remember – linux uses yum (error: There are no enabled repos)
          • Error reported:
          • Solution:
      • 3. After solving the problem, start the installation, Complete! As shown below:

1. General introduction of the situation:

1. Virtual machine related content

Software: VMware? Workstation

Version: 16.2.1 build-18811642

Image version: CentOS-7-x86_64-DVD-2009, CentOS-7-x86_64-DVD-1810

Installation system selection: server GUI

Software installed after entering the system:

  • gcc-9.2.0

  • make-4.2.1

  • glibc-2.18

2. Encountered related problems

After installing and compiling gcc, make, and glic and restarting, the graphical interface is not displayed and the command line interface cannot be switched.

3. Current (ultimate) solution
systemctl set-default multi-user.target

or

startx

2. Linux cannot enter the graphical interface

I am new to Linux. I have installed a graphical interface on centos Linux. I could use it before, but today I suddenly jumped to the full command line mode and could not enter the graphical interface even after restarting. The solution process is as follows:

1. According to the error message, abrt-auto-reporting 157……

Execute “abrt-auto-reporting enabled” and then restart, but the problem is not solved

1. Error when booting

Last login: Thu Nov 9 21:01:53 2023 from 192.168.72.1
ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 169954913

2. Execute the corresponding command

[root@bogon ~]# abrt-cli list --since 169954913
id 2ca68039642a06229c08abaff4ed8e9a92646cc2
reason: gnome-shell killed by SIGSEGV
time: Thu 09 Nov 2023 09:19:33 PM CST
cmdline: /usr/bin/gnome-shell
package: gnome-shell-3.28.3-30.el7
uid: 42 (gdm)
count: 1
Directory: /var/spool/abrt/ccpp-2023-11-09-21:19:33-1987

The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges

3. Continue to execute related commands

[root@bogon ~]# abrt-auto-reporting enabled

2. Baidu Linux cannot enter the graphical interface, please refer to relevant articles and perform the following steps

1. Solution to the problem that Linux cannot enter the graphical interface

1. Directly enter graphics

Enter startx and press Enter;

2. If you want to automatically enter xwindos every time;

Modify inittab file;

vi /etc/inittab;

Find the line id:3:initdefault:;

Press i to enter edit mode;

Change 3 to 5;

Press esc to exit editing;

Enter “:qw” (including “:”).

2. Solution to the problem of being unable to enter the graphical interface (GNOME, KDE, etc.) after Linux installation

1. Question:

Found that there is no id:3:initdefault: line

2. Solution:

I have been using the level3 command line to learn Linux before. Today I feel it is necessary to familiarize myself with the operation of the GUI, so I tried to switch to the graphical interface and tried many methods without success. Then I suddenly realized that what I installed was a customized minimal version, so there was no such thing as XWINDOWS or GNOME installed for me. So I had to download it myself and then call it.

The process is as follows:
1. Enter the following command on the command line to install the Gnome package
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
2. Update the system’s run level

If you want to automatically enter the graphical interface when the system starts next time, then we need to change the run level of the system and enter the following command to enable the graphical interface.

ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
There is another way to set GNOME as the default startup interface (without ctrl + alt + F1)
1. Enter the command line mode of cenos7
2. Enter “init 3” in the terminal and press Enter to enter the command line mode

3. After successful login, use systemctl get-default to obtain the current system startup mode

View configuration file

# cat /etc/inittab


Through the above display, the system is currently in command line mode.

Change mode command:

systemctl set-default graphical.target changes from command line mode to graphical interface mode

systemctl set-default multi-user.target changes from graphical interface mode to command line mode

Verify whether it is correct after making the change: reboot; the interface is as follows

3. SMbus Host Controller not enabled

Execute “change mode command: systemctl set-default graphical.target to change from command line mode to graphical interface mode”, and then reboot to restart, but the problem is not solved.

During the restart process, it was found that the computer prompted “SMbus Host Controller not enabled

Environment:

Client ubuntu17.04

Host win7

Question:

SMbus Host Controller not enabled

Reason:

Ubuntu loads the i2c_piix4 module causing

When searching on the Internet, a netizen’s post said that x32 Ubuntu was installed on x64 computers. However, the netizen still gave a solution to the problem, as follows:

#1# Enter root mode

#2# Enter lsmod | grep i2c_piix4

(The name of the output module should be displayed after the first command line. This screenshot was taken after the problem was solved and is not displayed.)

#3# Enter vi /etc/modprobe.d/blacklist.conf to enter the vim editor

#4# Click — i — to edit

#5# Add: blacklist i2c-piix4 to the last line of this configuration file

#6# Click – Esc – to exit editing mode

#7# Keyboard input–:wq–Save and exit

#8# Finally enter–reboot–restart the virtual machine to solve the problem

Possible problems

Question:

Please tell me how to save the file. After I added blacklist i2c-piix4 to the last line of etc/modprobe.d/blacklist.conf, I couldn’t save it. E212 was displayed, “can’t open file for writing”. The upper folder was also created, and sudo was added in front of vi. Still Unable to save file.

Solution

You need to open it as root user or sudo to modify it.

4. yum -list error reporting

The “SMbus Host Controller not enabled” problem has been solved. The error is no longer reported when restarting, but the graphical interface still does not appear.

I planned to reinstall the graphical interface, but found that my yum could not be used normally. Execute yum list and the error is as follows:

Refer to “Yum -list Error Report” to completely perform the full text operation,

Question:

When you configure the yum source on another host through ftp, the error message appears as follows:

[root@client ~]# yum list
Loaded plugins: fastestmirror
^C^Ccd ^H^H^Hcd ^H^H^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 & amp;arch=x86_64 & amp;repo=os & amp;infra= stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
 
 
 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:
     1. Contact the upstream for the repository and get them to fix the problem.
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).
     3. Disable the repository, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:
 
            yum-config-manager --disable <repoid>
 
     4. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:
 
            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
 
Cannot find a valid baseurl for repo: base/7/x86_64
Solution:
1. Then first check whether the firewall is closed or not. If it is not closed, use the following command to close it
systemctl stop firewalld.service
2. Secondly check whether SELINUX=disabled is Disabled or Permissive. If not, please perform the following operations:

Turn off selinux

# vi /etc/sysconfig/selinux
SELINUX=disabled

#getenforce

Disabled
3. If it is still not the case, you need to go to the /etc/yum.repos.d/ directory to view the file

The ones in the red box need to be connected to the Internet. If your virtual machine has a single network card and no external network card is configured, it is recommended to move these files to other directories.

The execution process and results are shown in the figure below

yum problem solving

5. Install Gnome package

1. If it is Ubuntu, do not continue to install yum

There are no enabled repos. Run "yum repolist all" to see the repos you have. You can enable repos

I stepped on a lot of pitfalls tonight, and I must summarize them. First, let’s talk about the origin of this error.

When I installed pcre, I got this error:

configure: error: You need a C++ compiler for C++ support.

Then I searched Baidu and found that someone provided such a solution:

I did so, but I found that there was no yum, so I installed yum for a long time, and finally installed it.

This time I got this error again.

There are no enabled repos. Run "yum repolist all" to see the repos you have. You can enable repos

I was so drunk that I checked and found out that I shouldn’t have installed yum because I was using Ubuntu.

I should use the following statement to solve the problem “You need a C++ compiler for C++ support.

sudo apt-get install build-essential

2. Installing the Gnome package, but error There are no enabled repos (There are always more solutions than difficulties!!!) Solution

Remember-linux uses yum (error: There are no enabled repos)
Error report:

CentOS7 uses yum to install the application, but it prompts that there is no valid image.

Solution:
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3. After solving the problem, start the installation, Complete! As shown below:

If you want to automatically enter the graphical interface when the system starts next time, then we need to change the run level of the system and enter the following command to enable the graphical interface.

ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

reboot still failed, desperate! ! ! This toss-up has become somewhat adaptable to using the command line. I don’t know what went wrong. There are many solutions. If you encounter problems, try a few more times. I hope you can succeed.

hymanhe

Linux cannot enter the graphical interface solution

Turing’s cat.

Solution to the problem of being unable to enter the graphical interface (GNOME, KDE, etc.) after Linux installation

搴华

SMbus Host Controller not enabled

dayaoK

yum -list error report

Did Jay Chou drink milk tea today?

There are no enabled repos. Run “yum repolist all” to see the repos you have. You can enable repos

leon-chan

Remember – linux uses yum (error: There are no enabled repos)

ForestWorld

Linux cannot enter the graphical interface