In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces why the remote desktop vnc can not be installed, the article is very detailed, has a certain reference value, interested friends must read it!
Try to install a VNC Server on CentOS. CentOS5 already has its own VNC, which is installed by default, as long as it is configured (if it is not installed, it can be installed by yum install vnc vncserver). The Windows client only needs to install a vncviewer, such as realvnc.
After installation and configuration, it cannot be used. There are two main problems:
1. Unable to connect to VNC Server.
2. Black screen appears after connecting.
The solution is summarized as follows:
Usage tools: IIS7 server management tools
The VNC function in this tool can be said to be very good to use. It can export or import with one click, open VNC in batches with one click, close VNC in batch with one click, and have expiration reminders, as well as multiple VNC custom notes and custom grouping. Finally, it also supports win and linux batch management, which is a very easy to use feature. It can save you to record IP and password one by one, and click on it to open it instantly.
Of course, since its VNC tools are so useful, its other functions must not be too bad. IIS7 server bulk management tools benefits: batch management, synchronization operations, expiration reminders, data security and periodic execution. Applicable systems: Windows and liunx operating systems. Vnc and Ftp batch operations are supported.
VNCServer configuration:
1. Modify configuration file / root/.vnc/xstartup
Note: some system configurations have-nolisten tcp and-nohttpd, which prevent Xwindows login and HTTP VNC login. If you need a graphical interface, delete this part.
If you are using the gnome graphics interface, you need to comment out the following two lines
# xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
# twm &
And add the following line:
Gnome-session &
For example, my configuration file is as follows
#! / 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 &
Gnome-session &
two。 Modify the user profile: / etc/sysconfig/vncservers
Open the configuration file: vi / etc/sysconfig/vncservers, and remove the "#" before the following two lines, that is, remove the comments from these two lines.
VNCSERVERS= "1:root"
VNCSERVERARGS [1] = "- geometry 800 × 600"
1 means that VNC runs as Desktop 1, which starts the desktop of root. You can add other users, such as VNCSERVERS= "
1RolootMagic 2Rom user1Rom User2 ", of course, these users exist in the implementation system.
For example, my / etc/sysconfig/vncservers configuration file is as follows:
VNCSERVERS= "1:root"
VNCSERVERARGS [1] = "- geometry 800 × 600"
In addition: if there is an image interface, check vncserver in system Settings > Server Settings > Services, and you can start with the system.
3. Change the permissions of xstartup
This problem is easy for many people to ignore, and it is also one of the reasons for the black screen after a successful connection.
In CentOS, the file path of xstartup is: / root/.vnc/ (you can view the file path of xstartup through locate xstartup)
So you need to execute: chmod 777 root/.vnc/xstartup
4. Turn off firewall restrictions on VNC ports
If you need to control a Linux of the internal network from the external network, you need to open the corresponding port of the firewall and map the port on the router.
The port of VNC to the browser is 5800N, and the port to vncviewer is 5900NMagneN is the set display number.
If you do not want to turn on the firewall, but still need the VNC service, you need to:
Edit vi / etc/sysconfig/iptables
Add the following two lines:
-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 5901-j ACCEPT
-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 5902-j ACCEPT
What is needed here is that the port corresponding to display N is 5900mm N, so it is not recommended to set too much.
5. Start VNC Server:
Open the terminal to execute: vncserver
The first time you run vncserver, you will be asked to enter your password twice and you will see the following prompt:
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/localhost.localdomain:1.log
The ": 1" in the above information indicates the first vnc desktop launched.
6. Stop vncserver: (optional read)
Stop vncserver by executing: vncserver-kill: 1
Note: ": 1" means to stop the first vnc desktop, 1 represents the currently enabled VNCserver sequence number, and ": 1" is preceded by a space. If the current startup sequence number is 2, to turn it off, you should use "vncserver-kill: 2".
7. Modify vnc password: (optional read)
The way to change the vnc password is to execute: vncpasswd
Enter the password twice.
8: check whether the server-side VNC Server is running properly:
Execute: ps-ef | grep vnc
If vnc is executing, you can see a message similar to this:
[root@IMS ~] # ps-ef | grep vnc
Root 3605 10 Jul13? 00:13:51 Xvnc: 1-desktop MyIMS.local:1 (root)-httpd / usr/share/vnc/classes-auth / root/.Xauthority-geometry 800x600-depth 16-rfbwait 30000-rfbauth / root/.vnc/passwd-rfbport 5901-pn
The description is that the serial number is ": 1" the vnc process listens on port 5901.
9.VNC client
After the server side is working properly, we can consider using the VNC client to connect to it.
Configuration of Windows client VNC Viewer:
1. Download VNC Free Edition for Windows Version 4.1.2
two。 Open VNCViewer:
Fill in the IP of VNCServer: number (1 or 2 or …)
3. VNCViewer switches to full-screen mode: F8
10 some configuration files:
/ etc/X11/xorg.conf sets the screen resolution
At this point, your VNC should be able to connect, but there may be a black screen problem:
1. Check the log log under / root/.vnc/ to see if there is any error; it is possible that the xstartup permission is not enough. "chmod xstartup 777" change
Permission, restart and then enter.
Restart the computer and give it a try. I am after various configurations, always black screen, restart the computer after OK.
These are all the contents of the article "Why can't you install vnc through remote Desktop?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.