当前位置:文档之家› VNC Server和VNC Viewer使用方法

VNC Server和VNC Viewer使用方法

6
SHRIME
2.vncpasswd - change a VNC password
2009-02
ห้องสมุดไป่ตู้
SYNOPSIS
vncpasswd [passwd-file]
DESCRIPTION
vncserver can be run with no options at all. In this case it will choose the first available display number (usually :1), start Xvnc as that display, and run a couple of basic applications to get you started. You can also specify the display number, in which case it will use that number if it is available and exit if not, eg:
FILES
Several VNC-related files are found in the directory $HOME/.vnc: $HOME/.vnc/xstartup
A shell script specifying X applications to be run when a VNC desktop is started. If it doesn't exist, vncserver will create a new one which runs a couple of basic applications. $HOME/.vnc/passwd The VNC password file. $HOME/.vnc/host:display#.log The log file for Xvnc and applications started in xstartup. $HOME/.vnc/host:display#.pid Identifies the Xvnc process ID, used by the -kill option.
2)无法启动应用软件的图形界面? 答: VNC Server 需设置-depth 参数为 24(在 putty 中操作)
step1:执行命令 $vncserver -kill :display#
step2: $vncserver –depth 24
3)VNC Serve 是 linux 系统自带的 本手册中的 VNC Viewer 是 windows 版本,如没安装,请联系。
DESCRIPTION
vncserver is used to start a VNC (Virtual Network Computing) desktop. vncserver is a Perl script which simplifies the process of starting an Xvnc server. It runs Xvnc with appropriate options and starts some X applications to be displayed in the VNC desktop.
命令。
6)其他可参阅 /index.html 网站。
4
SHRIME
2009-02
附录:VNC 主要命令
1.vncserver - start or stop a VNC server
SYNOPSIS
vncserver [:display#] [-name desktop-name] [-geometry widthxheight] [-depth depth] [-pixelformat format] [Xvnc-options...] vncserver -kill :display#
请设置并牢记该密码。可用 vncpasswd 命令修改密码(详见附录“vnc 命令”) 2)vncserver 命令可带参数(options),也可不带参数(详见附录“vnc 命令”) 2. 启动 VNC Viewer
启动 VNC Viewer,出现如图 6,在 Server:后的方框内输入需要登录的工作 站的 IP,后面接着你的桌面号,如登录 cad3,display#是:12,所以输入:
OPTIONS
You can get a list of options by giving -h as an option to vncserver. In addition to the options listed below, any unrecognised options will be passed to Xvnc - see the Xvnc man page, or "Xvnc -help" for details. -name desktop-name
图1
图2
1
SHRIME
2009-02
然后,如图 3 在第一行划横线出输入用户名,就是你需要登录的用户名,如 jum,回车。输入与帐户名相对应的密码,回车。
图3
图4
出现如图 4 的情况,在光标位置输入: $vncserver [-options]
回 车 , 便 会 出 现 如 图 5 的 情 况 , 请 记 住 display# , 本 例 中 为 12
192.168.100.13:12 选择 OK,出现如图 7 的对话框,输入之前设置的密码。选择 OK,便登录工 作站了。
图6
3
SHRIME
2009-02
图7
注意: 1)为什么连接后,不能显示桌面,而只有一个 Terminal 窗口? 答: (在 putty 中操作) step1:执行命令 $vncserver –kill :display# (本例中中 display#为 12) step2: 编 辑 $HOME/.vnc/xstartup, 把 所 有 行 都 注 释 掉 , 再 加 上 一 行 gnome-session & step3:重启 vncserver $vncserver [-options] step4:重新启动 VNC Viewer
Each desktop has a name which may be displayed by the viewer. It defaults to "host:display# (username)" but you can change it with this option. It is passed in to the xstartup script via the
vncserver :13
Editing the file $HOME/.vnc/xstartup allows you to change the applications run at startup (but note that this will not affect an existing desktop).
2
(cad3.shrime:12)。
SHRIME
2009-02
图5 注意: 1 ) 如 果 是 第 一 次 启 动 vncserve , 会 提 示 输 入 密 码 You will require a password to access your desktops. Password: Verify:
5
SHRIME
2009-02
$VNCDESKTOP environment variable, allowing you to run a different set of applications according to the name of the desktop. -geometry widthxheight Specify the size of the desktop to be created. Default is 1024x768. -depth depth Specify the pixel depth in bits of the desktop to be created. Default is 16, other possible values are 8, 15 and 24 - anything else is likely to cause strange behaviour by applications. -pixelformat format Specify pixel format for server to use (BGRnnn or RGBnnn). The default for depth 8 is BGR233 (meaning the most significant two bits represent blue, the next three green, and the least significant three represent red), the default for depth 16 is RGB565 and for depth 24 is RGB888. -cc 3 As an alternative to the default TrueColor visual, this allows you to run an Xvnc server with a PseudoColor visual (i.e. one which uses a colour map or palette), which can be useful for running some old X applications which only work on such a display. Values other than 3 (PseudoColor) and 4 (TrueColor) for the -cc option may result in strange behaviour, and PseudoColor desktops must be 8 bits deep. -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.
相关主题