Configure and use linux vnc
VNC (Virtual Network Computing) Virtual Network Computing tool is essentially a remote display system. The administrator can not only view the desktop environment on the local machine where the program runs, in addition, you can view the running status of remote machines anywhere on the Internet, and it has cross-platform features.
To use Remote Desktop in Linux, you need to install VNC. Fortunately, Red Hat Enterprise Linux AS 4.0 already comes with VNC, which is also installed by default. You just need to configure it. However, the Windows client must be installed.
1. Start VNC Server:
Open the terminal and run: vncserver
[Root @ localhost] # vncserver
You will require a password to access your tops.
Password:
Verify:
Xauth: creating new authority file/root/. Xauthority
New 'localhost. test: 1 (root) 'desktop is localhost. test: 1
Creating default startup script/root/. vnc/xstartup
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/localhost. test: 1.log
You have new mail in/var/spool/mail/root
When you run vncserver for the first time, you are required to enter the password twice. ": 1" in the above message indicates the first vnc desktop to be started.
2. start, stop, and restart VNC
# Service vncserver start/stop/restart
Command: vncserver-kill: 1
Note ": 1" indicates that the first vnc desktop is stopped.
3. Change the vnc password:
To change the vnc password, run vncpasswd and enter the password twice.
4. By default, the VNC Viewer can only view the command line of the VNC Server.
To see the Linux desktop on the VNC Viewer, you need to make the following settings:
On the machine where the VNC Viewer is located, cancel the following two lines of comments in the/root/. vnc/xstartup file:
Unset SESSION_MANAGER
Exec/etc/X11/xinit/xinitrc
The command is as follows:
(1) modify the vnc configuration parameters to remotely view the desktop, not the gray state...
[Root @ localhost] # vi/root/. vnc/xstartup
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
Unset SESSION_MANAGER logout
Exec/etc/X11/xinit/xinitrc logout
[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
Xsetroot-solid gray
Vncconfig-iconic &
Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop" & logout
Twm & logout
(2) Disable vncserver: 1 and restart vncserver: 1. The command is as follows:
[Root @ localhost soft] # vncserver-kill: 1
[Root @ localhost soft] # vncserver: 1
5. VNCServer is automatically run after Linux is started.
1) Check the vncserver in system Settings> Server Settings> service.
2) Open the configuration file/etc/sysconfig/vncservers and remove the comments in the following line,
VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "-geometry 800 × 600 ″
1 indicates that VNC runs on desktop 1, so that the root desktop can be started.
6. VNC Port
If you want to control a Linux instance on the Intranet from the Internet, you need to open the corresponding port of the firewall and perform port ing on the vro.
The port number that VNC gives to the browser is 5800 + N, the port number for vncviewer is 5900 + N, and N is the set display number.
Configuration of Windows client VNC Viewer:
1. Slave
Http://www.realvnc.com/download.html
Download VNC Free Edition for Windows Version 4.1.2
2. Open VNCViewer:
Enter the IP address of the VNCServer: Number (1 or 2 or ...)
3. VNCViewer switch to full screen mode: F8
By the way, SSH in Linux is also a good remote management tool, but SSH does not have a graphical user interface.
--------------------------
Here is the installation tutorial ..
According to the online tutorial, I just cannot connect,
View the files under my root/. vnc
There are many *. logs in it.
Finally, modify it in/etc/sysocnfig/vncserver.
Changed to 3. The desktop was connected successfully ,,,
Why can't the first two be used?
Please analyze ,,,,
Author: "Xiao Yi De's blog is Xiao Yi Tang Yong"