Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1008759
  • 博文数量: 195
  • 博客积分: 4890
  • 博客等级: 上校
  • 技术积分: 2221
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-09 15:34
文章分类

全部博文(195)

文章存档

2014年(1)

2013年(8)

2012年(22)

2011年(9)

2010年(54)

2009年(101)

我的朋友

分类: LINUX

2014-01-02 11:31:08

BackTrack 5R3 安装VNC

1.安装vnc4server软件包并设置密码
root@bt:~# apt-get install vnc4server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libecryptfs0 libdmraid1.0.0.rc16 libdebconfclient0 ecryptfs-utils cryptsetup rdate bogl-bterm libdebian-installer4
  reiserfsprogs dmraid python-pyicu
Use 'apt-get autoremove' to remove them.
Suggested packages:
  vnc-java
The following NEW packages will be installed:
  vnc4server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,176kB of archives.
After this operation, 5,571kB of additional disk space will be used.
Get:1 revolution/main vnc4server 4.1.1+xorg4.3.0-37ubuntu2 [2,176kB]
Fetched 2,176kB in 4s (479kB/s)       
Selecting previously deselected package vnc4server.
(Reading database ... 264111 files and directories currently installed.)
Unpacking vnc4server (from .../vnc4server_4.1.1+xorg4.3.0-37ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up vnc4server (4.1.1+xorg4.3.0-37ubuntu2) ...
update-alternatives: using /usr/bin/vnc4server to provide /usr/bin/vncserver (vncserver) in auto mode.
update-alternatives: using /usr/bin/Xvnc4 to provide /usr/bin/Xvnc (Xvnc) in auto mode.
update-alternatives: using /usr/bin/x0vnc4server to provide /usr/bin/x0vncserver (x0vncserver) in auto mode.
update-alternatives: using /usr/bin/vnc4passwd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode.
update-alternatives: using /usr/bin/vnc4config to provide /usr/bin/vncconfig (vncconfig) in auto mode.
root@bt:~# vncserver 


You will require a password to access your desktops.


Password:
Verify:
New 'bt:1 (root)' desktop is bt:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/bt:1.log

/-- 此时系统会提示你输入密码,在通过客户端链接时将会用到这个密码。--/

2.编辑 /root/.vnc/xstartup 文件
root@bt:~# cd /root/.vnc
root@bt:~/.vnc# ls
bt:1.log  bt:1.pid  passwd  xstartup
root@bt:~/.vnc# vi xstartup

  1. #!/bin/sh  
  2. # Uncomment the following two lines for normal desktop:  
  3. unset SESSION_MANAGER               新增加行
  4. exec /etc/X11/xinit/xinitrc         新增加行
  5. [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup  
  6. [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources  
  7. #xsetroot -solid grey               注释行
  8. #vnccon** -iconic &                 注释行
  9. #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &   注释行
  10. #x-window-manager &                 注释行



 3.修改/etc/X11/xinit/xinitrc文件的许可,使其可执行
root@bt:~/.vnc# ls -alt /etc/X11/xinit/xinitrc
-rw-r--r-- 1 root root 166 2009-12-07 22:40 /etc/X11/xinit/xinitrc
root@bt:~/.vnc# chmod 755 /etc/X11/xinit/xinitrc
root@bt:~/.vnc# ls -alt /etc/X11/xinit/xinitrc
-rwxr-xr-x 1 root root 166 2009-12-07 22:40 /etc/X11/xinit/xinitrc
(vnc连接灰屏,跟这权限有关,执行之即可)

4.杀掉已经启动vnc4server并重启建立一个vnc4server
root@bt:~/.vnc# vncserver -kill :1
Killing Xvnc4 process ID 2299
root@bt:~/.vnc# vncserver -kill :1
Can't find file /root/.vnc/bt:1.pid
You'll have to kill the Xvnc4 process manually
root@bt:~/.vnc# vncserver
New 'bt:1 (root)' desktop is bt:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/bt:1.log
root@bt:~/.vnc# 

5.使用vncviewer.exe客户端软件登陆






阅读(2032) | 评论(0) | 转发(1) |
0

上一篇:Navicat Premium数据库工具

下一篇:没有了

给主人留下些什么吧!~~