一、在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" #远程桌面窗口大小为1280x768VNCSERVERARGS[2]="-geometry 1280x768"
step3:创建系统用户tghfly和test,并设置密码[root@www.linuxidc.com ~]#
useradd tghfly[root@www.linuxidc.com ~]#
passwd tghflyChanging password for user tghfly.New UNIX password:BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password:passwd: all authentication tokens updated successfully.[root@www.linuxidc.com ~]#
useradd test[root@www.linuxidc.com ~]#
passwd testChanging password for user test.New UNIX password:BAD PASSWORD: it is too shortRetype 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/.XauthorityNew "hongwb.com.cn:1 (tghfly)" desktop is hongwb.com.cn:1Creating default startup script /home/tghfly/.vnc/xstartupStarting applications specified in /home/tghfly/.vnc/xstartupLog file is /home/tghfly/.vnc/hongwb.com.cn:1.log
Ubuntu下安装配置Python 3.2.3集成开发环境Eric5Ubuntu 体验(Linux Kernel 2.6.38-9)无线网卡驱动问题相关资讯 CentOS教程
- CentOS上使用Dropbox (02/07/2013 09:11:47)
- CentOS 网络设置修改 (02/04/2013 21:28:42)
- CentOS如何安装whois命令 (01/20/2013 14:33:29)
| - CentOS 下修改/dev/shm 大小解决 (02/04/2013 21:30:15)
- CentOS 注销在线用户, Linux 注销 (02/04/2013 21:24:06)
- CentOS安装完重启后不能进入终端 (01/02/2013 16:04:02)
|
本文评论 查看全部评论 (0)