あなたが気づいたように、man vncserverから:
-kill :display#
This kills a VNC desktop previously started with vncserver. It does
this by killing the Xvnc process, whose process ID is stored in the
file "$HOME/.vnc/host:display#.pid". It actually ignores anything
preceding a ":" in its argument. This can be useful so you can write
"vncserver -kill $DISPLAY", for example at the end of your xstartup
file after a particular application exits.
ディスプレイ番号は、1つが手動でそれを設定していない場合は、ディスプレイのポート番号に接続されています(そして、異なる)、どこで
Display number = (Port number) ‒ 5900
例えば、ポート5901 → ディスプレイ:1。この情報は、それが言うところのman Xvnc(vncserverは、このツールを呼び出す単なるラッパースクリプトです)で見つけることができます:
-rfbport port
Specifies the TCP port on which Xvnc listens for connections from
viewers (the protocol used in VNC is called RFB - "remote
framebuffer"). The default is 5900 plus the display number.
あなたが番号を暗黙のうちに知らなければ(しかし、あなたがとにかくサーバーに接続するつもりならば、あなたはそれを知る必要があります)、あなたは情報のための例えばps ax | grep vncをチェックすることができます。私がローカルでそれを行う場合、私はプロセス
25697 ? S 55:38 Xvnc4 :1 [...]
[...]
30481 ? S 17:57 Xvnc4 :2 [...]
を見て、したがって、私は、それらがそれぞれ表示番号:1と:2を持つVNCサーバーを表し、
vncserver -kill :1
vncserver -kill :2
によって殺される可能性があることを知っています あなたの場合、あなたは、表示番号が:1の出力にリストされているサーバーのためのpsであることを見ています。