CentOS shares through VNC remote desktop management configuration tutorial

Time:2021-9-12

1、 Check whether VNC is installed

1. Install desktop

yum groupinstall “Chinese Support”

2. Install Chinese support

yum groupinstall “Desktop”

Directory to open the profile:

1) cd /etc/sysconfig

2) Edit profile: VI I18N

3) Note out the first line (lang = “en_us. UTF-8”) with the number. In fact, it is also possible to change it directly in this line. However, for the practice of insurance points, note it out first and delete it after success.

Add a new line under the first line, enter (lang = “zh_cn. UTF-8”), then save the file, restart the system, and you can see friendly Chinese.

3. Turn off the firewall and turn it on instead of starting the protective wall

[[email protected]centos ~]# service iptables stop

[[email protected] ~]# chkconfig iptables off

4. Check whether VNC is installed

[ [email protected] ~]#RPM – QA | grep VNC shows that the following similar instructions have been installed. Otherwise, carry out the following installation and configuration operations;
tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64

2、 Install VNC

[[email protected] ~]# yum –y install tigervnc-server
Add startup entry
[[email protected] ~]# chkconfig vncserver on

3、 Set VNC password

[[email protected] ~]# vncserver
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/centos:1.log
The. VNC directory and configuration file will be generated in the current user’s home directory
[[email protected] ~]# vncpasswd
Password:
Verify:
The set password is saved in / root /. VNC / passwd

3、 VNC configuration

Modify the xstartup file, delete the last TWM & and add Gnome session&

[[email protected] ~]#vi /root/.vnc/xstartup
xsetroot -solid grey

xsetroot -solid grey

xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

twm &

Change TWM & to Gnome session&
If you start directly, it will fail
[[email protected] ~]#service vncserver start

Starting VNC server: no displays configured [FAILED]

Therefore, modify the / etc / sysconfig / vncservers file and add the following
VNCSERVERS=”2:root”
#Desktop number: user;

#The listening port is 590 *, and the asterisk represents the desktop number

Vncservergars [2] = “- geometry 800×600” after this modification, you can normally enter the graphical interface even if the / etc / inittab startup mode is 3

Note: modify the default startup interface is to modify the number of this line, 3 is the text interface, and 5-digit graphical interface: ID: 3: initdefault:

Start vncserver
[[email protected] ~]#service vncserver start
Starting VNC server: 2: root xauth: (stdin): 1: bad display name “CentOS: 2” in “add” command

New ‘centos:2 (root)’ desktop is centos:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/centos:2.log

OK, you can now connect remotely through VNC viewer.

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]