Use the gnome desktop environment as an example to describe and configure it!
Modify the configuration file/root/. vnc/xstartup. Remember to copy the backup before modification!
The content in the red box is to be modified,
# Unset SESSION_MANAGER # Remove the comment of this row
# Exec/etc/X11/xinit/xinitrc # Remove the comment of this row
Add the second to the last row:
Gnome-session gnome # Add this sentence to use the gnome Desktop Environment During connection
Modified and saved!
If VNC has been started, the process is killed. Otherwise, the configuration must be restarted to take effect:
[Root @ localhost. vnc] # vncserver-kill: 1 # the port number corresponding to when you start vncserver.
[Root @ localhost. vnc] # vncserver: 1 # restart VNCSERVER. Note: There must be spaces before 1.
Note: The initial command "vncserver: 1" is to enter the connection password!
Start service: service vncserver start (status/restart)
Use VNC viewer on Windows,
Remember the IP address in the same format as the desktop number (similar to the port number )!
Enter the password when vncserver: 1 is entered.
Summary and description:
1. Summary
Connect to and use the client.
1. Access Method
A. in linux, run the vncviewer command. The server address is written as 192.168.1.11: 1.
B. In windows, run vncviewer of windows. Its usage is similar to that in linux.
C. Use a browser (platform-independent) and use it as a java applet to start it in the form of http: // 192.168.1.11: 5801 (vnc ports start from 5800 and so on, usually 5800,5900)
Common sense:
2. Change the password
Run vncpasswd.
3. Stop vncserver
# Vncserver-kill: 1
# Vncserver-kill: 2
Note that the vncserver can only be disabled by the user who starts it. the root user cannot immediately shut down the vncserver enabled by other users, and the process can only be killed using the kill command.
4. Stability settings
By default, when multiple clients connect to the display port of the same vncserver, the old connection of the vncserver port is used. For the new connection service, you can use-dontdisconnect to reject new connection requests and maintain the old connection.
5. The same monitor can connect to multiple clients.
# Vncserver-alwaysshared
6. Restart the service.
Service vncserver restart
7. Enable the VNCSERVER to be automatically started when the system starts.
Log on to the RedHat Linux GUI using VNC connection, click "system"> "management"> "Server Settings"> "service", find the VNCSERVER in "background services", and select it, click Save.
Author: "Xiao K Studio"