原先的11.3配置VNC始终打开,需要配置seat,session和display三个在/etc/ConsoleKit下面的配置文件;11.4开始简单了,不再需要手动配置上述三个文件,简单的运行vncserver (root用户或者普通用户皆可)就能启动Xvnc Session后台守护进程
但Xvnc是进程不是Service,所以如果Solaris11.4重启了,还是得重新执行vncserver再启动这个进程的
From the vncserver(1) man page:
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 a window
manager on the VNC desktop.
vncserver can be run with no options at all. In this case it will
choose the first available display number (usually :1), start Xvnc with
that display number, and start the default window manager in the Xvnc
session. You can also specify the display number, in which case vnc-
server will attempt to start Xvnc with that display number and exit if
the display number is not available. For example:
vncserver 执行是一般不用添加参数,第一个vncserver启动后对应:1,再执行下一个vncserver 端口号加一,以此类推
列如下面这个,就是直接启动13号
vncserver :13
默认11.4的Xvnc启动是附带的不监听tcp,它只监听本地。如果动用DISPLAY变量把显示跳转到其他Server上了,那X 图形化应用进程启动会失败;之所以默认用-nolisten tcp启动Xvnc是出于安全的考虑;当然也可以指定打开tcp listener
vncserver -listen tcp
例子:
root@t62:$ vncserver
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
New ‘t62.nc.abc.com:1 (root)’ desktop is t62.nc.abc.com:1
Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/t62.nc.abc.com:1.log
//在笔记本上面用realVNC的client端,或者MobaXterm连接t62.nc.abc.com:1 or 5901都可以