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

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

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

一、在Linux服务器中,我们通常是通过ssh进行远程操作,偶尔需要有桌面支持或图形化安装相关软件时,则需要远程到服务器桌面或将输出图形调到客户端。

Linux下的远程工具通常用到的有xmanager、vnc。以下将简单介绍vnc的应用。

step1:安装vnc并启动vnc

[root@www.linuxidc.com ~]# rpm -qa |grep vnc  #需安装以下两个包
vnc-4.1.2-14.el5_6.6
vnc-server-4.1.2-14.el5_6.6

[root@www.linuxidc.com ~]# service vncserver start  #启动vnc服务

Starting VNC server: no displays configured [  OK  ]

 

step2:修改 /etc/sysconfig/vncservers 配置文件,添加tghfly和test用户,设置会话窗口,并使用gnome桌面

[root@www.linuxidc.com ~]# grep -v "#" /etc/sysconfig/vncservers

VNCSERVERS="1:tghfly 2:test"     #1表示登录会话窗口,tghfly表示登录用户

VNCSERVERARGS[1]="-geometry 1280x768"   #远程桌面窗口大小为1280x768

VNCSERVERARGS[2]="-geometry 1280x768"

 

step3:创建系统用户tghfly和test,并设置密码

[root@www.linuxidc.com ~]# useradd tghfly

[root@www.linuxidc.com ~]# passwd tghfly

Changing password for user tghfly.

New UNIX password:

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

[root@www.linuxidc.com ~]# useradd test

[root@www.linuxidc.com ~]# passwd test

Changing password for user test.

New UNIX password:

BAD PASSWORD: it is too short

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

 

step4:切换到tghfly和test,设置远程登录密码,生成远程认证文件

[root@www.linuxidc.com ~]# su - tghfly

[www.linuxidc.com@linuxidc ~]$ vncserver #使用vncserver设置当前用户远程登录密码

You will require a password to access your desktops.

Password:

Verify:

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

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

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

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

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

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

       

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