← 返回命令列表

Linux command

vncserver 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

vncserver

Example

vncserver -geometry [1920]x[1080]

Example

vncserver :[display_number]

Kill

vncserver -kill :[display_number]

List

vncserver -list

说明

vncserver launches a VNC (Virtual Network Computing) desktop server. It creates a new X display that can be accessed remotely using a VNC viewer. Each server instance runs on a separate display number. The first available display is used if not specified.

参数

-geometry _WxH_
Specify desktop size (default: 1920x1200).
-depth _depth_
Pixel depth in bits (16, 24, or 32; default: 24).
-kill _:DISPLAY_
Kill a previously started VNC server on the specified display.
-list
List all running VNC server instances.
-localhost _yes|no_
Only accept connections from localhost. Useful with SSH tunneling.
-SecurityTypes _types_
Comma-separated list of security types (None, VncAuth, Plain, TLSVnc, X509Vnc, etc.).
-desktop _name_
Desktop name displayed to connecting clients.
-fg
Run the server as a foreground process.
-autokill _yes|no_
Automatically kill the server when the session script exits (default: yes).
-xstartup _script_
Run a custom startup script instead of the default session script.
-noxstartup
Do not run any startup script after launching the server.
-rfbport _port_
TCP port for VNC connections (default: 5900 + display number).

FAQ

What is the vncserver command used for?

vncserver launches a VNC (Virtual Network Computing) desktop server. It creates a new X display that can be accessed remotely using a VNC viewer. Each server instance runs on a separate display number. The first available display is used if not specified.

How do I run a basic vncserver example?

Run `vncserver` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -geometry _WxH_ do in vncserver?

Specify desktop size (default: 1920x1200).