Previously you installed Kali Linux on Windows 10 as its own app. Launching it brings up the Kali Linux command prompt and from there you can enter most of the usual Linux command. Now let’s make it a little more interesting.
Xfce Desktop Environment
The Xfce Desktop Environment is a perfect match for a project such as this. It’s fast, lightweight and doesn’t take much to get it installed and working. What you’re going to do here is download a script that you can execute to initialise and install the desktop as well as the remote desktop client to attach to Kali Linux.
To begin, make sure you’re in the Kali Linux app and have completed a system update and upgrade, to ensure everything is as up to date as possible. When you’re ready, enter the following:
What you’re doing here is using the wget command to locate the xfce4.sh file at the web address entered. This downloads the xfce4.sh file to the Kali Linux system. You can enter: ls to view the file once it’s downloaded to check it’s there.
You can also view the contents of the xfce4.sh file by entering:
Note: for those of you unfamiliar with the Linux command line, you are able to auto complete a command by pressing the tab key. For example, instead of entering cat xfce4.sh, you could enter: cat x and press the tab key to auto-fill the remaining letters. The contents of the xfce4.sh file may not make much sense if you’re a newcomer to Linux scripting but it displays a message that the desktop is being installed, then checks the system for updates and forcibly upgrades any components. Then it installs the Xfce4 desktop and the Xrdp remote desktop client and finally sets the remote desktop client to ‘listen’ on port 3390 for any connections. If you want to learn more about Linux, it’s command line and Linux scripting, take a look at our range of Linux and Coding titles.
The next step in the process is to execute the script and install the relevant components. You need to use the sudo (Super User) administrative command in order to do this. Enter:
sudo sh xfce4.sh
This enables a higher level of admin privileges to execute the contents of the xfce4.sh script. Enter your password and the script begins the installation process; be warned though, it could take some time to complete. Eventually, a blue screen appears, asking you to choose a keyboard layout. Use the arrow keys to scroll down and select Other if your keyboard isn’t US-based. This leads to another screen, where you can press Return to pick the relevant keyboard layout. Once the keyboard has been defined, the installation process continues.
You can enter the command clear to clear the screen once the installation has finished and you’re back at the command prompt; it just makes it easier to see what you’re doing. The script you just executed, installed and set up is Xrdp, the remote desktop client that you connect to using the Windows Remote Desktop software. This is what enables the Desktop Environment. Currently, Xrdp is configured to listen for any connections on port 3390 but hasn’t started yet. To enable the connection, enter:
sudo /etc/init.d/xrdp start
Now you can connect to the Desktop Environment, that you just installed on Kali Linux, through the Xrdp remote desktop client. Click on the Windows Start button and type remote. Click on the Remote Desktop Connection app that appears in the results.
With the Windows Remote Desktop Connection launched, enter the following into the Computer box:
This means it looks for a connection at the address 127.0.0.1, which is the local address of the computer you’re working on, at port number 3390. Click the Connect button.
You should now see a new login window. Ensure the Session is set to Xorg and enter your Kali Linux username and password, then click the OK button.
When the desktop boots up it asks you for a Panel setup, so click the Use Default Config button. Don’t worry about the Network Manager message not being connected, launch the Internet on the remote Kali Linux desktop and notice that you have access.
Now you’re all done. You’re using a Desktop Environment installed in Kali Linux, which is in itself an app installed on Windows 10. From here on, we recommend you read through the Kali Linux site’s documentation, found at https://www.kali.org/, to see how best to use this remarkable Linux distro.