VNC for Linux Services

Source: Internet
Author: User

[email protected]. vnc]# Rpm-qa|grep VNC
vnc-server-4.1.2-14.el5_6.6
2. start the VNC service

Use the Vncserver command to start the VNC service, the command format is "Vncserver: Desktop Number", where "desktop number" as a "number" means, each user needs to occupy 1 desktop
    Start a desktop with number 1 For example, under
    [[email protected] ~]# vncserver:1
    you'll require a Password to access your desktops.
    Password:
    Verify:
    xauth:  Creating new Authority file/root/. Xauthority
    New ' testdb:1 (root) ' Desktop is testdb:1
    Creating Default startup script. /root/.vnc/xstartup
    Starting applications specified In/root/.vnc/xstartup
     Log file Is/root/.vnc/testdb:1.log
    above command execution process, because is the first execution, need to enter the password, This password is encrypted in the. VNC subdirectory (/ROOT/.VNC/PASSWD) in the user's home directory, and the Xstartup configuration file (/root/.vnc/xstartup) is automatically created for the user in the. VNC subdirectory of the user's home directory. The configuration information in this file is read every time the VND service is started. The
    btw:/root/.vnc/directory also has a "testdb:1.pid" file that records the process number that corresponds to the acquired operating system after VNC is started, which is used to accurately locate the process number when the VNC service is stopped. The relationship between the port number and the desktop number used by the
3.VNC service

The port number used by the VNC service is related to the desktop number, and VNC uses the TCP port starting with 5900, corresponding to the following:  
Desktop number is 1  ----port number is 5901
Desktop number is 2  ----port number is 5902
The 3  ----port number is 5903
    ...
    Java-based VNC client Web service The TCP port starts at 5800 and is related to the desktop number, corresponding to the following
    the desktop number is "1"  ---- Port number is 5801
    desktop number is "2"  ----port number is 5802
    desktop number is "3"  ----port number is 5803
    ...
    based on the above, if Linux turned on the firewall function, you need to manually open the appropriate port, to open the desktop number "1" the corresponding port as an example, the command is as follows
    [[Email  protected] ~]# iptables-i input-p tcp--dport 5901-j ACCEPT
    [[email protected] ~]# IPT Ables-i input-p TCP--dport 5801-j ACCEPT

4. Test VNC Service
By using a Web browser (such as Firefox,ie,safari) to log in to the test, the procedure is as follows
Address bar Input http://144.194.192.183:5801/--the VNC viewer for Java (this tool is a VNC client program written in Java) interface, while jumping out of the VNC Viewer dialog box, enter "144.194.192.183:1" click "OK"--Password Enter the login password-click "OK" Login to X-window graphical desktop environment-Test success
(Note: VNC Viewer for Java requires JRE support, if the page cannot be displayed, indicating that no JRE is installed, you can download the latest JRE to http://java.sun.com/javase/downloads/index_jdk5.jsp here for installation)

5. Configure the VNC graphical desktop environment for the GNOME desktop environment
If you are configured according to my method above, landing on the desktop after the effect is very simple, only one shell to use, this is why? How can I see a cute and beautiful KDE or GNOME desktop environment? Answer as follows
It's so ugly because the VNC service uses the TWM graphical desktop environment by default and can be modified in the VNC configuration file Xstartup, first look at this configuration file
[Email protected] ~]# Cat/root/.vnc/xstartup
#!/bin/sh
# Uncomment the following-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 &
Change the last line of this xstartup file to "Gnome-session &", and then restart the Vncserver service to log in to the GNOME desktop environment
How to restart the Vncserver service:
[Email protected] ~]# vncserver-kill:1
[Email protected] ~]# vncserver:1
Note: In what capacity you start the vncserver:1, then you log on to the graphical interface is the identity of the landing,
When you install Oracle, you need to install your Oracle identity, so you should start with Oracle Vncserver:1

VNC for Linux Services

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.