1. System Software settings CentOS end: Check whether the vnc software is installed # rpm-qvncvnc-serverpackagevncisnotinstalledvnc-server-4.1.2-14.e15_3.1 above the information that is to say, vnc is not installed, and vnc-server has been installed. Install vc # yuminstallvnc If vnc-server is not installed, then # yuminstall
1. System Software settings
CentOS:
Check whether vnc software is installed
# Rpm-q vnc-server
Package vnc is not installed
Vnc-server-4.1.2-14.e15_3.1
The above information means that vnc is not installed, and vnc-server is already installed.
Then install vc
# Yum install vnc
If vnc-server is not installed
# Yum install vnc-server
Ubuntu:
Install vnc4server
$ Sudo apt-get install vnc4server
Set Password
$ Vncpasswd
Password:
Verify:
$ Vim ~ /. Vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
After modification:
Comment the last two lines, that is, add #
# X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# X-window-manager &
Add
Gnome-session &
$ Vnc4server
Warning: user-MS-7549: 1 is taken because of/tmp/. X11-unix/X1
Remove this file if there is no X server user-MS-7549: 1
Xauth: creating new authority file/home/user/. Xauthority
New 'user-MS-7549: 2 (user) 'desktop is user-MS-7549: 2
Creating default startup script/home/user/. vnc/xstartup
Starting applications specified in/home/user/. vnc/xstartup
Log file is/home/user/. vnc/user-MS-7549: 2.log