Portál AbcLinuxu, 11. května 2025 21:26
To change the default port for vncserver on Linux from 5900 (+display number), you must first open the file /usr/bin/vncserver as root (or sudo) with your favorite text editor. If you scroll down to around 25% mark in the file, you’ll see the line:
$vncPort = 5900 + $displayNumber;
Change 5900 to whatever port you would like, save the file, stop and restart the vnc service.
Java (port 5800 + display number) doesn’t seem to change, so how do we change it? This is a little easier. When starting up your vnc server, just add the option “-httpport “. For example:
vncserver -display 800x600 -depth 16 -httpport 5000
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.