Remote desktop settings and troubleshooting in centos
Source: Internet
Author: User
I have been studying linux remote connection over the past few days. now I have recorded the following information: 1. check whether the VNC client and server have been installed and run the following command: rpm-qvncvnc-server if the following information is returned, [root @ localhostlikeshare] # rpm...
I have been studying linux remote connection over the past few days. now I have recorded the following information: 1. check whether the VNC client and server have been installed and run the following command: rpm-q vnc-server. if the following information is returned, [root @ localhost likeshare] # rpm-q vnc-server vnc-4.1.2-14.el5_6.6 vnc-server-4.1.2-14.el5_6.6 indicates that the system has installed the vnc server by default (in general, CentOS systems have installed the vnc server by default ). If you have not installed vnc-server, you can install yum install vnc-server online as follows to confirm that vnc-server has been installed and started vncserver [root @ localhost likeshare] # vncserver New 'localhost: 4 (likeshare) 'desktop is localhost: 4 Starting applications specified in/root /. vnc/xstartup Log file is/root /. vnc/localhost: 4.log www.2cto.com 2. modify the startup process of the Windows controller of the vnc server. The vnc configuration file and log file are stored in. edit the xstartup file in the vnc/file to make the window manager look better. the default value is twn, which is a bit worried. [root @ localhost likesha Re] # vi ~ /. 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 /. xresources] & xrdb $ HOME /. xresources xsetroot-solid gray vncconfig-iconic & xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop" & # twm & comment out this # gnome-session & # add this line # startkde # kde desktop # If you use kde to remove the comment before this line If other users follow the instructions in sequence, add the user name to the configuration file in the CentOS system and run the following command to edit the configuration file and add account information: vi/etc/sysconfig/vncservers: # Uncomment the line below to start a VNC server on display: 1 # as my 'myusername' (adjust this to your own ). you will also # need to set a VNC password; run 'Man vncpasswd' to see how # to do that. www.2cto.com # do not run this service if your local area network is # untrusted! For a secure way of using VNC, see # lt; URL: http://www.uk.research.att.com/vnc/sshvnc.htmlamp;gt ;. # VNCSERVERS = "1: myusername" # VNCSERVERS = "1: gavin 2: john" # use the method for more user VNCSERVERS = "2: root "# VNCSERVERARGS [1] ="-geometry 800x600 "VNCSERVERARGS [2] ="-geometry 1024x768 "this is my own configuration file # VNCSERVERS =" 1: user1 2: user2 3: user3 "VNCSERVERS =" 2: root "# VNCSERVERS = [2] ="-geometry "# VNCSERVERS = [3] ="-geometry 1024x768 "VNCSERVERARGS [2] ="-geometry 800x600 "# VNCSERVERARGS [2] = "-geometry 800x600- Nolisten tcp-nohttpd-localhost "# VNCSERVERARGS [2] ="-geometry 800x600-nolisten tcp-nohttpd-localhost "What I don't understand here is, the logon user I set is root, but I can log on using likeshare. I don't know why. if I have time to test it, press esc to exit vi and press "wq" to press enter to start vncserver 3. run the following command to start vnc server sbin/service vncserver start: Starting VNC server: 2: root [OK] there are several examples of startup failure that I have encountered. 1. The configuration file is incorrect, for example, the parameter is incorrect, I have a problem writing the format because the VNCSERVERARGS [2] = "-geometry 800x600" resolution is incorrect. Therefore, if the service is started, try to solve the problem. 4. log on from the VNC view install vnc view on windows, enter xxx. xxx. xxx. xxx: 2. connect to log on and enter the password. Note: If connection refused (10061) is prompted when you log on from the vnc view, it is because of a linux firewall problem. log on to the centos system, select SystemPreferencesRemote Desktop, and check the two items in sharing, security does not check the two items. click close and then log on to www.2cto.com with vnc view again. you can also use the command to set the firewall as follows: vi/etc/sysconfig/iptables to find the following statement: -a rh-Firewall-l-INPUT-j REJECT-reject-with icmp-host-prohibited: -A Rh-Firewall-l-INPUT-m state-state NEW-m tcp-p tcp-dport 5900-j ACCEPT
Author lt200819
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