免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4572 | 回复: 1
打印 上一主题 下一主题

搞定:VNC多用户登陆黑屏问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-03 11:29 |只看该作者 |倒序浏览
安装了CentOS+Gnome,系统默认安装了vncserver,chkconfig vncserver on,并配置了/etc/sysconfig/vncservers如下:
  1. # The VNCSERVERS variable is a list of display:user pairs.
  2. #
  3. # Uncomment the lines below to start a VNC server on display :2
  4. # as my 'myusername' (adjust this to your own).  You will also
  5. # need to set a VNC password; run 'man vncpasswd' to see how
  6. # to do that.  
  7. #
  8. # DO NOT RUN THIS SERVICE if your local area network is
  9. # untrusted!  For a secure way of using VNC, see
  10. # <URL:[url]http://www.uk.research.att.com/archive/vnc/sshvnc.html[/url]>.

  11. # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

  12. # Use "-nohttpd" to prevent web-based VNC clients connecting.

  13. # Use "-localhost" to prevent remote VNC clients connecting except when
  14. # doing so through a secure tunnel.  See the "-via" option in the
  15. # `man vncviewer' manual page.

  16. # VNCSERVERS="2:myusername"
  17. VNCSERVERS="1:user1 2:user2"
  18. VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
  19. VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

  20. # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
复制代码


现在的问题是:
user1和user2那个都可以正常连接,user1连接进去可以正常使用,但user2连进去是黑屏状态,只有一个鼠标在里面,等好长时间也还是这样。

其中user1、user2的xstartup配置文件是一样的:
  1. #!/bin/sh

  2. # Uncomment the following two lines for normal desktop:
  3. unset SESSION_MANAGER
  4. exec /etc/X11/xinit/xinitrc

  5. [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
  6. [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  7. xsetroot -solid grey
  8. vncconfig -iconic &
  9. xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  10. #twm &
  11. gnome-session &
复制代码


请问有没有哪位朋友遇到过类似的问题,发表一下高见。

[ 本帖最后由 zhxd 于 2009-7-3 23:59 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-07-03 12:15 |只看该作者
在网上搜了,有人说要把user2的xstartup文件属于修改为777,测试是可以。
但感觉有点不太安全。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP