Centos build graphical interface and VNC

The installation may cause DNS to be cleared, so you need to execute the following command first and then follow the steps to install:

 

chattr +i /etc/resolv.conf

installation:

 

yum install -y tigervnc tigervnc-server

yum groupinstall "Desktop"

yum install gnome-panel

yum install nautilus

Set the login password (execute the following command, you need to enter it twice):

 

vncpasswd

Configuration (compare whether the following configuration file is consistent with yours):

 

cat ~/.vnc/xstartup

#!/bin/sh

[-r /etc/sysconfig/i18n] &&. /etc/sysconfig/i18n

export LANG

export SYSFONT

vncconfig -iconic &

unset SEVPSION_MANAGER

unset DBUS_SEVPSION_BUS_ADDREVPS

OS=`uname -s`

if [$OS ='Linux' ]; then

case "$WINDOWMANAGER" in

*gnome*)

if [-e /etc/SuSE-release ]; then

PATH=$PATH:/opt/gnome/bin

export PATH

fi

;;

esac

fi

if [-x /etc/X11/xinit/xinitrc ]; then

exec /etc/X11/xinit/xinitrc

fi

if [-f /etc/X11/xinit/xinitrc ]; then

exec sh /etc/X11/xinit/xinitrc

fi

[-r $HOME/.Xresources] && xrdb $HOME/.Xresources

xsetroot -solid grey

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

twm &

Start and close vnc:

 

vncserver :1

vncserver -kill :1

Client connection test

The client software used is: vnc viewer

(1) Enter the server's external network IP: 1

 

(2) Enter the login password set by vncpasswd

 

(3) Interface after successful connection

 

 

6. Attached

! This operation is under the root user. If you need to create a new account to log in to vnc, please create a system account first, set the vnc login password under this account, and start the vnc service


at 12/06/2020, 18:19pm

Been read 955 times

Similar Articles

BBR acceleration


       This article introduces one-key fool-style upgrade of the kernel and installation of BBR acceleration. Affirm: The tutorial for one-click installation of BBR was created by Teddy! Google's TCP BBR congestion control...

How to mount a disk under Linux


Theoretically adapt to all Linux systems, just determine the mount point Copy all the following commands directly and paste them into the SS terminal: mkfs.ext4 /dev/vdb echo'/dev/vdb /home ext4 defaults 0 0'>> /etc/fstab mount...

What People wrote...

Powered by WHMCompleteSolution