following instructions I found on (https://www.itzgeek.com/how-tos/linux/c ... hel-7.html) I installed Gnome and XFCE desktops on centos 7. but now while I can ssh to centos and run commands, but cannot run GUI. I ran "startx" command but got this message:
Code: Select all
cuser@localhost ~]$ sudo startx
[sudo] password for cuser:
xauth: file /root/.serverauth.2756 does not exist
xinit: unable to run server "/usr/bin/X": No such file or directory
Use the -- option, or make sure that /usr/bin is in your path and
that "/usr/bin/X" is a program or a link to the right type of server
for your display. Possible server names include:
....
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
!
!
!
[cuser@localhost ~]$ ls /usr/bin/X
ls: cannot access /usr/bin/X: No such file or directory
Code: Select all
[cuser@localhost ~]$ gnome-shell --version
GNOME Shell 3.22.3
#
[cuser@localhost ~]$ systemctl get-default
graphical.target
#
[cuser@localhost ~]$ runlevel
N 5
#
[cuser@localhost ~]$ ls -l /etc/systemd/system/default.target
lrwxrwxrwx. 1 root root 36 Jan 18 04:24 /etc/systemd/system/default.target -> /lib/systemd/system/runlevel5.target
[cuser@localhost ~]$ sudo systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
#
[cuser@localhost ~]$ systemctl default
[cuser@localhost ~]$ systemctl get-default
graphical.target
[cuser@localhost ~]$ runlevel
N 5