The experimental system is centos6.5, which requires the installation of Vncserver on the connected machine.
1. First method: Adjust with the geometry parameter
Use the man command to get a description of the geometry parameter
[email protected] ~]# man Vncserver
......
-geometry Widthxheight
Specify the size of the desktop to be created. Default is 1024x768.
......
Visible, the default resolution is 1024x768, we can use this parameter to adjust the resolution.
For example, we need to adjust the resolution to 800x600
[Email protected] ~]# Vncserver-geometry 800x600
New ' Secdb:5 (root) ' Desktop is Secdb:5
Starting applications specified In/root/.vnc/xstartup
Log file Is/root/.vnc/secdb:5.log
Using "192.168.23.102:5" to login VNC will get a 800x600 operation window.
Other resolution adjustments please try it yourself.
2. Second method: Modify the configuration file Vncservers
[Email protected] ~]# vi/etc/sysconfig/vncservers
# The Vncservers variable is a list of display:user pairs.
#
# Uncomment the line below-to-start a VNC server on display:1
# as my ' myusername ' (adjust this to your own). You'll also
# need to set a VNC password; Run ' man vncpasswd ' to see how
# to does that.
#
# do not RUN the this SERVICE if your the local area network is
# untrusted! For a secure-to-the-using VNC, see
# <url:http://www.uk.research.att.com/vnc/sshvnc.html>.
# vncservers= "1:myusername"
# vncserverargs[1]= "-geometry 800x600"
vncservers= "1:root 2:oracle"
vncserverargs[1]= "-geometry 1024x768"
vncserverargs[2]= "-geometry 1024x768"
For example, we can adjust the last line to the following
vncserverargs[2]= "-geometry 800x600"
After restarting Vncserver, using "192.168.23.102:2" login VNC will get a 800x600 operation window, the user is Oracle.
[Email protected] ~]#/etc/init.d/vncserver restart
Shutting down VNC server:1:root 2:oracle [OK]
Starting VNC server:1:root 2:oracle [OK]
3. Summary
There are pros and cons to the two methods of modification, please adjust according to the specific environment. Using the first method is simple and the impact is small, because the method is provided by starting the VNC process separately, but it is easy to leave too many VNC processes in the system, and the second method is realized by adjusting the default resolution of VNC, realizing centralized management, However, there are problems that the client cannot use due to high resolution adjustment.
Modify the VNC resolution size