|
如果你不是在本地上使用 KALI Linux,那么你需要给该台计算机上安装个 VNC,这样方便于远程图形界面连接。
下面介绍如何在 KALI Linux 上安装 Vnc Server 。
1. 安装 vnc4server xinetd 两个软件包:
- apt-get install vnc4server xinetd
复制代码
其中 vnc4server 就是 VNC 服务器软件;xinetd 是一个超级守护进程,在它旗下管理着多个服务进程,比如 telnet,vnc 等。
2. 启动 vnc4server
这时,会提示你输入密码,该密码用来登录 VNC 会话。注意,这个密码不是计算机用户密码。下面输出:
root@kali:~# vnc4server
You will require a password to access your desktops.
Password:
Verify:
xauth: file /root/.Xauthority does not exist /* 提示 .Xauthority 文件不存在,不要紧,系统会自动生成*/
New 'kali:1 (root)' desktop is kali:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/kali:1.log
如果要停止 vnc4server ,那么可以类似下面的执行:
3. 编辑 /root/.vnc/xstartup 文件,这个很简单,就只依据提示去掉 unset 和 exec 开头的两行,于是有:
#!/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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
4. 修改 /etc/X11/xinit/xinitrc 文件权限,使之有执行权限:
- chmod 755 /etc/X11/xinit/xinitrc
复制代码
5. 再启动 vnc4server 。
此时,可以通过客户端来连接该台 VNC 服务器了,比如在 Windows 下可以使用 vnc viewer :
地址后面也可以不需要写完整的端口号(5091),如只写成 1 即可。
或者在 linux 的命令行中执行 vncviewer 192.168.7.206:1 。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|