`
sooxin
  • 浏览: 250903 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

linux 安装 vnc

阅读更多

yum groupinstall gnome-desktop /  yum groupinstall "Desktop" 
yum install gnome-session
2,安装VNC和其他

yum -y install vnc vnc-server firefox x11-xorg
yum -y install fonts-chinese

重要:要执行yum groupinstall "X Window System" "GNOME Desktop Environment" "KDE (K Desktop Environment)"
这个,不然不稳定

 

1.在linux系统下安装VNC Server,大多数linux发行版都带了VNC Server的发行包.只要选择安装就可以了.
2. 在Windows下安装VNC 客户端,以RealVNC为例,VNC客户端叫做VNC Viewer.VNC的使用相对比较简单,输入客户端的IP,然后VNC会进行连接,然后弹出密码框输入密码.没有问题的话就连接上了.
3. 配置linux VNC Server.

(1)启动VNC 服务.通过puTTY以SSH方式登录服务器,假设用户名为test

login as: test
 [test@MyServer's password:
 [test@xok.la ~]$ /etc/init.d/vncserver start
 Starting VNC server: no displays configured                [  OK  ]
(2)运行vncserver命令,如果第一次配置VNC Server,会要求提供登录VNC使用的密码.以后也可以使用vncpasswd来修改密码.

[test@xok.la ~]$ vncserver

 You will require a password to access your desktops.

 Password:123456
 Verify:123456
 xauth:  creating new authority file /root/.vnc/.Xauthority

 New 'xok.la.localdomain:1 (test)' desktop is xok.la.localdomain:1

 Creating default startup script /root/.vnc/xstartup
 Starting applications specified in /root/.vnc/xstartup
 Log file is /root/.vnc/xok.la.localdomain:1.log
(3)此时就可以在Windows使用VNC viewer登录了
输入服务器地址:192.168.0.64:1
然后提示输入密码,输入你刚才设定的密码就好了,如123456

注意:IP地址后面的:1的意思是linux上面VNC设定的Display No.每运行一个vncserver就会多创建一个Display,Display No也就会加一.
虽然此时可以登录,但是登录后看到的界面是X term的界面,还不是正常的X Window界面,我们要修改配置,使之使用X Window

(4)修改配置文件/root/.vnc/xstartup,使之与下面内容相同

[test@xok.la .vnc]$ cat 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 &
(5)保存文件,在puTTY终端中输入vncserver,让VNC打开一个新的Display

[test@xok.la ~]$ vncserver

 New 'xok.la.localdomain:1 (test)' desktop is xok.la.localdomain:2

 Starting applications specified in /root/.vnc/xstartup
 Log file is /root/.vnc/xok.la.localdomain:2.log
(6)使用VNC Viewer重新登录


本文来自: E点废墟(www.xok.la) 详细出处参考:http://xok.la/2008/11/linux_vncserver_win_client.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics