RedHat et5 configure VNC

Source: Internet
Author: User
Tags ultravnc viewer

I. Installation

1. log on to the server using securecrt on the client and run it on the terminal.

#rpm -qa|grep vnc

Check whether VNC is installed. If yes, the system will prompt
Vnc-4.1.2...
Vnc-server-4.1.2 ....

If the RedHat As5 is not installed, find the CD2 of the RedHat As5 installation disk and find the vnc_server_linux_4.1.2.rpm file,

Use the upload tool to upload files. Use the "RZ" command in securecrt. Pay attention to the upload path.

2. After the upload is successful, run

 #rpm –Uvh vnc_server_4.1.2.rpm

Complete the installation.

Ii. ConfigurationVNC

1: If it is only the account currently logged on (for exampleRoot) CreateVNCTo log on, follow these steps:

Run on the terminal

#vncserver
 

Enter the verification password as follows. (This password has nothing to do with the system account password, it is bound to the VNC port, and the VNC port is related to the user's VNC desktop)

After the password is entered, the following content is displayed: Xauth: creating new authority file/root /. xauthority/* Create Password File */New 'cn03: 1 (Root) 'desktop is cn03: 1/* Create a New Root User desktop, the default port number is 5901 */creating default startup script/root /. VNC/xstartup/* Root User Startup Script */starting applications specified in/root /. VNC/xstartup/* application configuration of the root user */log file is/root /. VNC/cn03: 1.log/* log file location */remember the display serial number (: 1). The default value is 1. This number is related to the port to be opened on the server, that is, the 5900 + Serial number, for example, 5901,5902. Execute:

 #vncserver -kill :1  

/*Close the process. Note that there are spaces between kill and ": 1 ".*/

Configure xstartup in the./VNC folder in the main directory as follows:

Add gnome-session & or startkde &,
Choose gnome-session &. In this way, the desktop is the same as the desktop on the server.
After modification, save the file and exit.

Execute again

 #vncserver

Port 5901 is enabled on the server. If the firewall on the server is enabled, port 5901 must be enabled.

2If you configure the server, create multiple accountsVNCFollow these steps to connect:

Edit

#vi /etc/sysconfig/vncservers

Add the following lines to save and exit (three users must exist in the system: Root, Oracle, Rrosen)

VNCSERVERS="1:root 2:oracle 3:rrosen"VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"

UseRootUser Login,Run the vncserver command to configure your own VNC)

#vncserver

The system prompts you to enter the password.

To change the passwordVncpasswd, Configure the current user'sVNCPassword.

Configure xstartup in the./VNC folder in the main directory as follows:

Activate: unset session_managerexec/etc/X11/xinit/xinitrc comment out the remaining lines. This configuration reads the configuration from the/etc/sysconfig/vncservers file.

 

After the configuration file is edited, restart the service to make the configuration take effect:

# Vncserver-kill: Z # vncserver: ZZ is the temporary port number of your VNC service. (You can run the command # ps-Ef | grep xvnc to view the port number)

Iii. Related Configuration

To start the vncserver service immediately, run the following command:

# service vncserver start

To automatically start the vncserver service during boot, run the following command:

# chkconfig vncserver on

Note: No output is generated after this command is executed, and a command prompt is directly returned, as shown in figure

# chkconfig vncserver on# chkconfig --list vncservervncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Iv. modify resolution

The default resolution of vncserver is 1024x768, and our current display generally supports higher than this. For better real-world images, modify the resolution and only modify the service currently started. Run:

# vncserver  -geometry 1280x1024

To modify the default resolution size, modify the/usr/bin/vncserver file.

It is generally recommended that you run the VNC service when it is started. do not modify the default resolution to prevent the resolution from being too high on other machines.


5. Common commands

# Vncserver-kill: Z/* Kill a vnc desktop. Note that there are spaces in the middle */

# Vncserver: Z/* start a new VNC desktop */

Vi. Client

The client can use UltraVNC viewer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.