In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The default port of vnc is configured by itself, not that there is a port number.
By opening/etc/sysconfig/vncservers. Here are 2 desktops configured, one desktop number is 1 and one is 2.
Here are the configuration parameters
VNCSERVERS="2:root"VNCSERVERARGS[2]="-geometry 1280x800"
As you can see, there are 2 desktops configured here, one with desktop number 1 and one with remote desktop resolution.
To modify vncserver configuration, first find the configuration file path
[root@jtsyb01 longrise]# which vncserver/usr/bin/vncserver
Then look at the type of profile,
[root@jtsyb01 longrise]# file /usr/bin/vncserver/usr/bin/vncserver: a /usr/bin/env perl script text executable
The basic information that can then be learned is available through text type files
By looking up the previously configured port, I configured port 80 here.
[root@jtsyb01 longrise]# grep "80" /usr/bin/vncserver -n84: "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".222:$vncPort = 8001 + $displayNumber;419: if (! bind(S, pack('S n x12', $AF_INET, 8001 + $n))) {
Through the terminal, you can see that the previous port 8001 on my side is the basic port. By modifying the vncport in line 222 and the number 8001 in line 419, save the file after modification.
Restart the vnc server service and successfully modify the vnc port number.
Finally, you can check the port status:
[root@jtsyb01 longrise]# ps -ef|grep vncroot 17134 1 0 May23 ? 00:13:00 /usr/bin/Xvnc :1 -desktop jtsyb01:1 (longrise) -auth /root/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 8002 -fp catalogue:/etc/X11/fontpath.d -pn
You can see that port 8002 is running.
The above modification method based on vnc configuration port number in Linux is all the content shared by Xiaobian to everyone, I hope to give you a reference, and I hope you will support it a lot.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.