Configure Xmanager and VNC in linux

Source: Internet
Author: User
Article Title: Configure Xmanager and VNC in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Today, we configured X manager and vnc on oracle linux. This is the first time we configured vnc. The vnc configuration is much simpler than X manager. Here we record it:

---- X manager Configuration:

1. modify the configuration file/etc/X11/TPD. conf of the target instance, and set the enable option in [xdmcp] to true.

[xdmcp]
# Distributions: Ship with this off. It is never a safe thing to leave
# out on the net. Setting up /etc/hosts.allow and /etc/hosts.deny to only
# allow local access is another alternative but not the safest.
# Firewalling port 177 is the safest if you wish to have xdmcp on.
# Read the manual for more notes on the security of XDMCP.
Enable=true

After you enter the path by using vi to edit the configuration file, enter the/xdmcp search string xdmcp "n" to search for the next sentence, so that you can quickly locate the xdmcp item.

2. Modify the/etc/X11/xdm-config file and comment out DisplayManager. requestPort: 0.



! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
!DisplayManager.requestPort: 0

3. Modify the/etc/X11/xdm/Xaccess file # * # any host can get a login window to remove the first part of this line #

# right hand sides can match.
#

* #any host can get a login window

#
# To hardwire a specific terminal to a specific host, you can

4. If a firewall exists, open port 177.

OK! Use X manager after configuration.

---- VNC Configuration

1. Check whether the rpm package is installed

[oracle@niuge ~]$ rpm -qa|grep vnc
vnc-server-4.0-11.el4
vnc-4.0-11.el4

As long as the first vnc-Server-4.0-11.El is enough. This is the server running program. If not, install

2. Run vncserver after installation

[test@niuge ~]$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth: creating new authority file /home/test/.Xauthority

New 'niuge:3 (test)' desktop is niuge:3

Creating default startup script /home/test/.vnc/xstartup
Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

You will be prompted to enter the logon password, and you will be prompted to remember this ": 3" is used when you log on to the vnc client. I have already enabled two machines, so this is: 3

3. Install the vnc client on the windows Server and run the client. The input method is shown in.

500) this. width = 500; "border = 0>

Click OK and prompt to enter the password you just set. Click to enter

500) this. width = 500; "border = 0>

OK! Do you think the command line method is uncomfortable? Don't worry. You can change the configuration to windows mode.

4. The following prompt is displayed when vncserver is Enabled:

Creating default startup script /home/test/.vnc/xstartup
Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

Let's take a look at the xstartup content:

#!/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/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

OK! It is easy to know how to normally enter the desktop.

# Uncomment the following two lines for normal desktop:
 unset SESSION_MANAGER
 exec /etc/X11/xinit/xinitrc

Save the modification and exit.

Stop vncserver first:

[test@niuge ~]$ vncserver -kill :3
Killing Xvnc process ID 30475
[test@niuge ~]$

Restart vncserver

[test@niuge ~]$ vncserver

New 'niuge:3 (test)' desktop is niuge:3

Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/niuge:3.log

OK! Repeat the preceding steps to log on to vnc again.

500) this. width = 500; "border = 0>

A familiar image is displayed.

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.