加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

LINUX下安装配置VNC服务的过程

发布时间:2016-10-22 06:25:49 所属栏目:Linux 来源:网络整理
导读:1.首先检查VNC软件是否已经安装 [root@ocm1 ~]# rpm -qa|grep vnc vnc-server-4.1.2-14.el5_3.1 2.启动VNC服务 使用vncserver命令启动,格式: server :1 ,这是

重启启动vncserver即可登陆到GNOME桌面环境:

[root@ocm1 ~]# vncserver -kill :1

Killing Xvnc process ID 2898

[root@ocm1 ~]# vncserver :1

New 'ocm1.bys.com:1 (root)' desktop is ocm1.bys.com:1

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/ocm1.bys.com:1.log

----此时使用VNC Viewer登陆后能看到GNOME桌面环境了。

比如在我的环境中,还配置了ORACLE用户的VNC,也要在ORACLE家目录下的/.vnc/xstartup文件进行本步的操作--完成同样要重启vncserver -kill :2。

[oracle@ocm1 ~]$ 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 &

[oracle@ocm1 ~]$ vncserver -kill :2

Killing Xvnc process ID 2680

[oracle@ocm1 ~]$ vncserver  :2

New 'ocm1.bys.com:2 (oracle)' desktop is ocm1.bys.com:2

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

Log file is /home/oracle/.vnc/ocm1.bys.com:2.log

注意:VNC Viewer中服务器地址栏需要输入IP+桌面号:192.168.57.215:2  这个地址就决定了用哪个用户登陆,不用再输入用户名,只输入密码即可。

6.配置多个桌面并设置VNC密码

可以使用如下的方法启动多个桌面的VNC

vncserver :1

vncserver :2

vncserver :3

……

更多精彩内容:http://www.bianceng.cn/OS/Linux/

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读