手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS 5.5配置VNC服务及客户端连接后输入法切换问题

[日期:2012-04-25] 来源:Linux社区  作者:firefly222 [字体:大 中 小]

step5:修改当前用户下的.vnc目录下的xstartup文件

[www.linuxidc.com@linuxidc ~]$ vi .vnc/xstartup 

#!/bin/sh

# Uncomment the following two lines for normal desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &     #注释行

#twm & #注释行

gnome-session & #新增行,调用gnome桌面

同理切换到test用户,按tghfly用户一样设置

[www.linuxidc.com@linuxidc ~]$ su - test

Password:

[test@hongwb ~]$ vncserver  #生成认证文件

You will require a password to access your desktops.

Password:

Verify:

xauth:  creating new authority file /home/test/.Xauthority

New 'hongwb.com.cn:2 (test)' desktop is hongwb.com.cn:2

Creating default startup script /home/test/.vnc/xstartup

Starting applications specified in /home/test/.vnc/xstartup

Log file is /home/test/.vnc/hongwb.com.cn:2.log

[test@hongwb ~]$ vi .vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

#twm &

gnome-session &

 

step6:到root用户下,重新启动vnc服务

[root@www.linuxidc.com ~]# service vncserver restart

Shutting down VNC server: 1:tghfly 2:test [  OK  ]

Starting VNC server: 1:tghfly

New 'hongwb.com.cn:1 (tghfly)' desktop is hongwb.com.cn:1

Starting applications specified in /home/tghfly/.vnc/xstartup

Log file is /home/tghfly/.vnc/hongwb.com.cn:1.log

2:test

New 'hongwb.com.cn:2 (test)' desktop is hongwb.com.cn:2

Starting applications specified in /home/test/.vnc/xstartup

Log file is /home/test/.vnc/hongwb.com.cn:2.log

[  OK  ]

linux
相关资讯       CentOS教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款