1. System software Setup
CentOS side:
See if the VNC software is installed
# rpm-q VNC vnc-server
Package VNC isn't 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 the VC
# yum Install VNC
If the vnc-server is not installed, then
# yum Install Vnc-server
Ubuntu side:
Installing Vnc4server
$ sudo apt-get install Vnc4server
Set Password
$ vncpasswd
Password
Verify
$ vim ~/.vnc/xstartup
#!/bin/sh
# Uncomment the following-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 the change is:
Note the last two lines, which are preceded by #
#x-terminal-emulator-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
#x-window-manager &
Then 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
2. Remote Desktop use
Using CentOS with Vncviewer (installed in the VNC package)
$ vncviewer
After Ubuntu Vnc4server is started, the default port is 5900
Then, the above new ' user-ms-7549:2 (user) ' Desktop is user-ms-7549:2 means +2,
So it's 5900+2=5902.
After OK, the password is the top
The password that is set in the $ vncpasswd.
If you're upside down, sign in to CentOS with Ubuntu Remote Desktop. Then install Xvnc4viewer in Ubuntu, set VNCPASSWD on CentOS, and the others will be reversed.
How Ubuntu connects to CentOS Remote Desktop