First, the software
a) tightvncserver is a lightweight, can only create a desktop, you can not view TTY7 / TTY1 Desktop is being displayed, but x11 vnc can, x11vnc secure transmission worse in comparison. On the contrary, x11 vnc: secure transport is better, but to be more resource intensive than tightvncserver.
b) XRDP server is a Remote Desktop Protocol (RDP), Xrdp is free software. Based on the work of rdesktop, it is designed to provide terminal server functionality for Linux.
Second, the installation tightvncserver
Execute the command: apt-get install tightvncserver (I here already exists)
root@kali:~# apt-get install tightvncserver Reading package lists... Done Building dependency tree Reading state information... Done tightvncserver is already the newest version (1:1.3.9-9). 0 upgraded, 0 newly installed, 0 to remove and 199 not upgraded. root@kali:~#
Third, the installation Xrdp
Execute the command: apt-get install xrdp
root@kali:~# apt-get install xrdp Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: xorgxrdp Suggested packages: guacamole xrdp-pulseaudio-installer The following NEW packages will be installed: xorgxrdp xrdp 0 upgraded, 2 newly installed, 0 to remove and 199 not upgraded. Need to get 588 kB of archives. After this operation, 3821 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.ustc.edu.cn/kali kali-rolling/main arm64 xorgxrdp arm64 1:0.2.9-1 [170 kB] Get:2 http://mirrors.ustc.edu.cn/kali kali-rolling/main arm64 xrdp arm64 0.9.9-1 [417 kB] Fetched 588 kB in 5s (128 kB/s) Selecting previously unselected package xorgxrdp. (Reading database ... 253097 files and directories currently installed.) Preparing to unpack .../xorgxrdp_1%3a0.2.9-1_arm64.deb ... Unpacking xorgxrdp (1:0.2.9-1) ... Selecting previously unselected package xrdp. Preparing to unpack .../xrdp_0.9.9-1_arm64.deb ... Unpacking xrdp (0.9.9-1) ... Setting up xrdp (0.9.9-1) ... Generating 2048 bit rsa key... ssl_gen_key_xrdp1 ok saving to /etc/xrdp/rsakeys.ini update-rc.d: We have no instructions for the xrdp init script. update-rc.d: It looks like a network service, we disable it. xrdp-sesman.service is a disabled or a static unit, not starting it. Setting up xorgxrdp (1:0.2.9-1) ... Processing triggers for systemd (241-7) ... Processing triggers for man-db (2.8.6.1-1) ... Processing triggers for libc-bin (2.28-10) ... root@kali:~#
Four, kali system configuration file
a) writing xfce4-session to the xsession
echo “xfce4-session” >~/.xsession
b) modify the file /etc/xrdp/startwm.sh
Before / etc / X11 / Xsession added xfce4-session
c) Restart xrdp
/etc/init.d/xrdp restart
Fifth, use the VNC
a) start ssh service
/etc/init.d/ssh start
b) start xrdp Service
/etc/init.d/xrdp start
c) Windows running mstsc remote desktop connection, enter the IP address, select Xorge, kali enter a user name and password.
Sixth, uninstall vnc
a) Uninstall xrdp
root@kali:~# apt-get purge xrdp Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: xrdp* 0 upgraded, 0 newly installed, 1 to remove and 199 not upgraded. After this operation, 2879 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 253222 files and directories currently installed.) Removing xrdp (0.9.9-1) ... Processing triggers for man-db (2.8.6.1-1) ... Processing triggers for libc-bin (2.28-10) ... (Reading database ... 253147 files and directories currently installed.) Purging configuration files for xrdp (0.9.9-1) ... Processing triggers for systemd (241-7) ... root@kali:~#
b) Uninstall tightvncserver
root@kali:~# apt-get purge tightvncserver Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: tightvncserver* 0 upgraded, 0 newly installed, 1 to remove and 199 not upgraded. After this operation, 1622 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 253115 files and directories currently installed.) Removing tightvncserver (1:1.3.9-9) ... Processing triggers for man-db (2.8.6.1-1) ... root@kali:~#
Reference article:
https://blog.csdn.net/wangqingliang2012/article/details/83070447