:
#! /Bin/sh
Xrdb $ home/. Xresources
Xsetroot-solid gray
Xterm-geometry 80x24 10 10-ls-title "$ vncdesktop desktop "
TWM
Change the last line
Startgnome
Display =: 1 gnome-session
Is to start the gnome GUI window.
After saving, restart VNC.
4. Download the Windows VNC client software.
Run VNC Viewer
need to install the graphic desktop? So we need to set it up to display the GNOME Desktop when connecting.
Run the following command to disable the VNC Server:
Vncserver-kill: 1
Then modify the xstartup file in the corresponding user directory:
Run the CD command to enter the. VNC directory under the user directory, and then run the vim command to modify the directory.
CD.
are using the CentOS 7 default firewall, you may need to
[Root@wic ~]# firewall-cmd--permanent--add-service vnc-server[root@wic ~]# systemctl Restart Firewalld.service
Sixth step, set the default startup and enable VNC
[Root@wic ~]# systemctl enable Vncserver@:1.service[root@wic ~]# systemctl start Vncserver@:1.service
So basically the CentOS end is set up, the Windows side to go to the next
] xrdb $ HOME/. XresourcesXsetroot-solid grayVncconfig-iconic # Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "# Twm (comment out the two rows)Gnome-session (add this line)
The above modification means to change the default twm program to gnome. if you want to use KDE as the desktop, you can change it to startkde
Run the following command to start vncserver:
Vncserver: 1
In this way, the connection is the gnome desktop.
If another user wants to connect to
Vnc-viewer in the Linux installation and configuration underVnc-viewerhttp://www.realvnc.com/download/get/1795/details/just fill it with the * number and you can download it.Operation Purpose:1, realize Win7- shaped remote CentOS2. Implement Win7 and CentOS data transferinstallation:yum–y intsll VNC *vnc-server*Configu
/.
Solution:
Mkdir/usr/x11r6/lib (may need to be created separately)
CD/usr/x11r6/lib
Ln-S/usr/share/X11 X11
Vncserver (Note that a number can also be added at this time. This number first appears at: log file is/root/. VNC/localhost. localdomain: 1.log1 is the number.)
3. Start the VNS client on windows after installation.
Connection format: Server IP: Number (for example, 10.10.19.169: 1)
After the connection, the desktop cannot be displayed, but
-editor;
Copy Code
The code is as follows:
sudo apt-get install Dconf-editor
2, need to adjust through the dconf-editor, open the terminal (shortcut key: ctrl+alt+t) input command: Dconf-editor open, and then access the following configuration path org > Gnome > Desktop > remote-access;
3, uncheck the "prompt-enabled" and "Requlre-encryption" properties.
Third, start the connection
Back in Windows, use the Client Access Tool VN
Http://www.spice-space.org/download.html can be downloaded to the Windows version of the Virt viewerVirt-viewer-x86-0.5.7.msi and Virt-viewer-x64-0.5.7.msi are compiled using MinGW, the source code is the use of virt-viewer-0.5.7.tar.gzIf you need to customize the Virt viewer, you need to compile the executable binary
first, the screen control principleVNC is the control of the screen into an image, compressed and transmitted to the control end, control information (such as mouse information) transmitted to the control end into the message queue.Client X Server ApplicationVNC viewer(VNC protocal) (X protocal)Its control is based on TCP/IP, where VNC server plays a dual role, a
Install VNC server on Centos 7
VNC is a good remote tool, whether based on Windows or Linux, Because I recently learned about Centos, therefore, we are going to build a VNC server on Centos 7 so that I can remotely connect to the server from the client through VNC viewer.
If
daemon-reload
Step 4: set a password for VNC
[root@wic ~]# vncpasswd
Step 5: because Centos 7 on my side uses iptable firewall
vim /etc/sysconfig/iptables
Add
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT
Restart iptable
service iptables restart
If you use the Centos 7 default firewall, you may need
[root@wic ~]# firewall-cmd --permanent --add-service vnc-server[root@wic ~]# syste
following code text to the end of the contents of the file:lxterminal /usr/bin/lxsession -s LXDE Press the key combination ctrl+x, enter Y, press two times to save and exit the file editor.10. Restart the VPS Host:reboot11. Re-login with putty to start the VNC service:vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565The installation process is complete, then, in the local computer to open the VNC
One, VNC Configuration connection remote server desktop1, Server Installation Vnc-server# yum-y Install Vnc-server2. Configure the VNC connection login password# VNCPASSWD Enter3, Configuration Vnc-server# vi/etc/sysconfig/vncservers4, cancel the following two lines of comme
Restart If you are using the CentOS 7 default firewall, you may need to [Email protected] ~]# firewall-cmd--permanent--add-service vnc-server[[email protected] ~]# systemctl Restart firewall D.service Sixth step, set the default startup and enable VNC [Email protected] ~]# systemctl enable [email protected]:1.service[[email protected] ~]# systemctl start [email protected ]:1.service So basically the CentOS
/xini T/XINITRC
[-x/etc/vnc/xstartup] exec/etc/vnc/xstartup
[-R $HOME/. Xresources] Xrdb $HOME/. Xresources
xsetroot-solid Grey
vncconfig-iconic
x-terminal-emulator-geometry 80x24+10+10-ls- Title "$VNCDESKTOP Desktop"
X-window-manager
You don't have to call it the description of the annotation, directly modify the following line:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
vncserver restart the service
Remember that the dispaly# here is 1.
Vncserver default port is 5900, this port is open in the firewall
Vi/etc/sysconfig/iptables
Locate the following statement:
-A rh-firewall-1-input-j Reject--reject-with icmp-host-prohibited
Before this trip, add the following:
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 5900:5903-j ACCEPT
Then restart the Iptables service: Services iptables restart
Can.
Open the Software
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.