Turn on Linux VNC Remote Desktop

Source: Internet
Author: User

Xwindows:gnome (Red Hat default installed GUI)   One, confirm and install Vncserver. 1, first confirm that your server is configured with Vncserver, you can click the command line below the command to view: [[email protected]: ~] #rpm-qa |grep vncvnc-server-4.1.2-14.el5_3.1. i386.rpm     #返回VNCSEVER服务器端版本说明你已经安装了VNCSERVER. 2, if Vncsever is not installed, locate the installation package from the CD to install it. First mount the disc (also called extract) to a directory here is the rhel5-64 directory Mount-o loop rhel-server-5.3-x86_64-dvd.iso/var/ftp/pub/, which is established under/var/ftp/pub/ rhel5-64/then locate the VNC-SERVER-4.1.2-14.EL5.X86_64.RPM installation package in the/var/ftp/pub/rhel5-64/server directory (you can also use the address:/HTTP/ centos.ustc.edu.cn/centos/5.5/os/i386/centos/vnc-server-4.1.2-14.el5_3.1.i386.rpm download), use the RPM command to install directly; RPM-IVH VNC-SERVER-4.1.2-14.EL5_3.1.I386.RPM (preferably configured with Linux yum servers, easy to install packages)   Two, start configuring VNCSERVER1, Start Vncserver, The first boot vncserver will prompt for a password, which is divided into the Administrator account and the general account, the starting mode slightly different. admin: [[email protected]/]# vncserveryou would require a password to access your desktops. password:123456             #输入vnc connection password verify:123456           &NB Sp     #确认vnc密码xauth: Creating new Authority file/root/. XaUthoritynew ' Localhost.localdomain:1 (root) ' Desktop is localhost.localdomain:1creating default startup script/root/. vnc/xstartup starting applications specified In/root/.vnc/xstartup log file is/root/.vnc/ localhost.localdomain:1.log  Normal User: [[email protected]/] #su ceboy     #ceboy username  [[email  protected]/]$ vncserveryou would require a password to access your desktops. password:123456             #输入vnc connection password verify:123456           &NB Sp     #确认vnc密码xauth: Creating new Authority file/home/ceboy/. Xauthoritynew ' Localhost.localdomain:2 (ceboy) ' Desktop is localhost.localdomain:2creating default startup Script/home /ceboy/.vnc/xstartup starting applications specified In/home/ceboy/.vnc/xstartup log file is/home/ceboy/. vnc/localhost.localdomain:2.log# here to note: Each user can start their own vncserver Remote Desktop, while each user can start multiple vncserver Remote Desktop, they use IP port number: ip:1, Ip:2, Ip:3 to identify, differentiate, and use the same port will automatically exit the logged-in user. Another, the big part of VncserverThe configuration files and log files are all in the user home directory. VNC directory. Users can customize the startup number such as: [[email protected]/]$ vncserver:2         #注意: 2 There must be a space in front.  a VNC Server is already running As:2 III, related desktop configuration, RedHat Linux supports two graphics modes: KDE mode and GNOME mode. 1. What graphics mode does your RH use? This is generally only a login to the GUI to know, or through the PS-A command list all currently running programs, see if there is KDE or gnome words to judge. If you are a GNOME desktop, then you need to modify the/root/.vnc/xstartup configuration file.  [[email protected]. vnc]# VI xstartup#!/bin/sh# Uncomment the following the lines for normal Desktop:unset SESS Ion_manager         #将此行的注释去掉exec/etc/x11/xinit/xinitrc         #将此行的注释去掉 [-x/etc /vnc/xstartup] && exec/etc/vnc/xstartup[-R $HOME/. Xresources] && Xrdb $HOME/. Xresourcesxsetroot-solid greyvncconfig-iconic &xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &gn Ome-session Gnome (or input: Gnome-session &)            #添加这一句是连接时使用gnome desktop environment TWM &   (my machine is annotated with a #, as if it were another desktop environment) It is best to restart the system once the settings have been modified, otherwise the settings will not take effect. I used the method of killing the vncserver process and then re-running Vncserver. [[email protected]. VNC] #vncserver-kill:1       #这里你启动vncserver时是什么端口号要对应上.  [[email protected]. VNC] #vncserver: 1           #重启VNCSERVER, note: 1 must be preceded by a space. 2, set the user information and resolution. [[email protected]: ~] #vi/etc/sysconfig/vncservers# The vncservers variable is a list of Display:user pairs.## Uncom ment the lines below to start a VNC server on display:2# as my ' myusername ' (adjust this to your own). You'll also# need to set a VNC password; Run ' man vncpasswd ' to-see how#-do that.## does not RUN the this SERVICE if your the local area network is# untrusted! For a secure to-do, using VNC, see# <url:http://www.uk.research.att.com/archive/vnc/sshvnc.html >.# use "-nolisten t CP "to prevent X connections to your VNC server via tcp.# use"-nohttpd "to prevent web-based VNC clients connecting.# use "-localhost" to prevent remote VNC clients connecting except when# doing so through a secure tunNel. See the "-via" option in the# ' Man vncviewer ' manual page. vncservers= "1:root 2:ceboy"             #此处添加用户, usually just add one 1:root. vncserverargs[1]= "-geometry 800x600-alwaysshared-depth"  vncserverargs[2]= "-geometry 1024x768-nolisten TCP- Nohttpd-localhost "#注意: Above is the resolution of the root and Ceboy two users set separately, note is differentiated by the port number. In addition, you can temporarily modify the resolution and color depth through the command line, this way will be lost after restarting, here for the moment, the command is as follows: [[email protected]: ~] #vncserver-geometry 800x600         #设置vncserver的分辨率   [[email protected]: ~] #vncserver-depth         and nbsp #设置vncserver的色深到这里VNCSERVER服务器端就配置完成了. Four, client connection and use. 1, Access mode  a, under Linux, run the vncviewer command, the server address of the form such as 192.168.1.11:1 b, under Windows, running Windows version of Vncviewer, Usage is similar to Linux.  c, browser (platform-independent), as a Java applet to implement, in a form like http://192.168.1.11:5801 to start (VNC Port starting from 5800, and so on, usually 5800,5900)     Below are some common sense: 2, change the password to run VNCPASSWD can 3, stop vncserver#vncserver-kill:1  #vncserver-kill:2 Notice that vncserver can only be turned off by the user who started it , instant root is not able to close other user-opened Vncserver, only withKill command to kill the process violently. 4, stability settings vncserver by default when multiple clients connect to the same vncserver display port, the Vncserver port old connection, and the new connection service, can maintain the old connection by-dontdisconnect rejecting the new connection request. 5, the same monitor can connect multiple client #vncserver-alwaysshared6, restart service vncserver restart7, let the system start automatically vncserver. Log in to the Redhat Linux GUI using a VNC connection, click on "System"--"manage"--"Server Settings"-"service", check it in "Background service" and click Save.

Turn on Linux vnc Remote Desktop

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.