How do I setup VNC based on xinetd with XDMCP for GDM?
http://kbase.redhat.com/faq/FAQ_45_11127.shtm
以上是redhat官方网站给的标准方法,不过此方法有一个缺点就是不小心关闭vncviewer窗口就等于注销,那之前辛苦很可能白做。使用一下修改版可避免。
在/etc/xinetd.d下 建立vtest
service vtest
{
disable = no
socket_type = stream
protocol = tcp
wait = yes #这个选项选yes就是用来防止不小心关闭vncviewer窗口而注销
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 800×600 -once passwordFile=/SomePath/passwd
}
最后一行的passwordFile用来在进入login窗口前先做一次认证用的,安全第一。
In the server_args section, the -query localhost will make each Xvnc instance query localhost for an xdmcp session.
然后修改/etc/services,添加
vtest 5951/tcp
注意:经实验似乎必须用595x否则会行不通
重启xinetd服务
service xinetd restart
登陆测试
vncviewer localhost:5951
注意:这次不是 :1 :2 这种了
首先先要求你输入vnc密码,然后进入red hat enterprise linux登陆框,登陆。
没问题。然后尝试直接关闭viewer窗口,再
vncviewer localhost:5951
输完vnc密码后直接进入刚才的桌面,桌面依然保持刚才关掉前的样子。成功了。
注销后用户退出了,服务器那边相关的Xvnc进程也正常关闭。
等有vncview访问该机器的5951端口,xinetd会再一次激活一个新的Xvnc进程
One Comment
See here if you want to change the number of comments displayed in the widget.
Post a Comment