Configuring VNCSERVER on RHEL5

  
 

VNC is a remote display system that allows administrators to view the desktop environment not only on the local machine where the program is running, but also to view the operation of the remote machine from anywhere on the Internet, and it has cross-platform features. Linux To use Remote Desktop, you need to install VNC, Centos5, RHCE5 already comes with VNC, the default is already installed, just configure it. But the Windows
client still has to be installed. The following methods refer to remote command configuration. If you can get the machine, you can set it directly on the desktop. Unfortunately, my machine is remote.

1. Add the user name of vnc. To the configuration file:

Note: Username refers to the name of the user who has joined the Linux system itself

# vim /etc/sysconfig/vncservers

VNCSERVERS=" 1:php-oa 2:root 3:root"VNCSERVERARGS[1]="-geometry 1024x768"

2. Set the user php-oa password to set which user, you must go to that user. If you just root, just type the command. #su - php-oa$vncpasswd

Password:Verify:

3. Start the VNC service to start the service with root#service vncserver start

4. Enter the command to set which user, you must go to that user. If you just root, just type the command. #su php-oa$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/.X Resources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &gnome-session &# Set starting GNOME desktop

Note: Some system configurations include –nolisten tcp and –nohttpd. These two are for blocking Xwindows login and HTTP mode VNC login. If you need a graphical interface, delete this. section.

5. Restart vncserver

#service vncserver restart

6. Both Windows and Linux can log in to VNC Server

(1). From IE and Firefox login

Enter the following address directly from the IE browser:

http://xxx.xxx.xxx.xxx:5801

Enter the password to use.

(2). Log in from VNC view

Install vnc view on windows, then enter xxx.xxx.xxx.xxx:5901, connect and log in, enter the password.

Note: The port of VNC to the browser is 5800+N, the port for vncviewer is 5900+N, and N is the display number. The firewall must open the setting of vnc, VNCViewer switches the full screen mode: F8< Br>

My practice steps

vim /etc/sysconfig/vncservers added two lines inside

VNCSERVERS="2:root"

VNCSERVERARGS[ ,null,null,3],2]="-geometry 800x600 "

Save

service vncserver restart

vncpasswd Since it is for the root user, it is entered directly and the password is set < Br>

service vncserver restartvim ~/.vnc/xstartup Cancel the following two lines of comments

unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc

service vncserver restart success

Run vnc in the window below

Enter in the server: 10.61.0.222:5902 Be sure to pay attention to the port

Enter the password you just set in the password.

Copyright © Windows knowledge All Rights Reserved