centos7 从命令行变为图形界面(简明教程)

1、按照https://www.linuxidc.com/Linux/2018-04/152000.htm这个教程执行,出现以下错误信息:
Transaction check error:
file /boot/efi/EFI/centos from install of fwupdate-efi-12-5.el7.centos.x86_64 conflicts with file from package grub2-common-1:2.02-0.64.el7.centos.noarch

2、根据这篇文章:https://www.cnblogs.com/godfather007/p/10120569.html,执行yum update grub2-common,再重新执行yum groupinstall -y “GNOME Desktop”。

3、执行完再执行startx出现以下提示:
[[email protected] ~]# startx
xauth: file /root/.serverauth.62269 does not exist

X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System: 3.10.0-957.1.3.el7.x86_64
Current Operating System: Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-693.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=zh_CN.UTF-8
Build Date: 14 March 2019 10:37:36AM
Build ID: xorg-x11-server 1.20.1-5.3.el7_6
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, () default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(
) Log file: “/var/log/Xorg.0.log”, Time: Thu Jun 13 10:39:30 2019
() Using config directory: “/etc/X11/xorg.conf.d”
(
) Using system config directory “/usr/share/X11/xorg.conf.d”
VMware: No 3D enabled (0, Success).
touch: 无法创建"/root/.cache/imsettings/log": 没有那个文件或目录

4、Poweroff,把虚拟机的3D图形打开,设置好显存。
centos7 从命令行变为图形界面(简明教程)

5、启动虚拟机,出现如下的界面:

centos7 从命令行变为图形界面(简明教程)

6、设置好后退出,进入命令行后输入startx,成功了!
centos7 从命令行变为图形界面(简明教程)