How to Install GUI in Kali-Linux Running on EC2-Instance

tarun mittal
3 min readSep 14, 2020

--

Hello Guys, This is my first blog on medium. Today I will tell you about how to install GUI on the Kali-Linux running inside an EC2-Instance. So guys Let’s get started.

I Use the Kali Linux ami Provided by the aws-marketplace to launch the aws-instance:-

https://aws.amazon.com/marketplace/pp/prodview-fznsw3f7mq7to?ref=cns_srchrow

Step1: First of all Login into you EC2-Instance:

using command:

ssh -i key.pem user@<instance-ip>

in this user will be kali , given at here, in the usage instructions :-

https://aws.amazon.com/marketplace/pp/prodview-fznsw3f7mq7to?ref=cns_srchrow#:~:text=View%20usage%20instructions

Step2: sudo apt update && sudo apt dist-upgrade -y

If you get any error while Installing the package related to some dependencies and all. move to Step 7, resolve the issue, and then continue from step3.

Step3: Install the linux headers

Step4: sudo apt install nvidia-driver nvidia-cuda-toolkit -y

Step5: To connect it and see the GUI, I installed RDP to get the GUI and connect it threw Remmina to get the output.

Step6: Start the xrdp service using the command:

sudo systemctl enable xrdp and systemctl start xrdp

Step7: To Solve the following error:

use the command:

sudo apt install gcc-8-base

or

sudo apt install gcc-9-base,

based on the machine, first, try with gcc-8 first, and if it doesn’t work then use gcc-9.

To Connect it with Remmina:

Step1: Install remmina in ubuntu from ubuntu sofware center if you don’t have.

Step2: Click on the Plus Icon on the Top as shown:

Step3: Type Server, Username, Password of the user in Kali-Linux and select color depth to High color(16 bpp) as shown

Step4: Click on Save and Connect at the bottom to connect to the GUI of Kali-Linux

ERROR:- IF you see black screen error after logging, then you can basically follow the below steps:-

  1. sudo apt-get install xfce4
  2. in the user home directory, from which you are trying to connect, for e.g tarun. In the home directory of the user we need to create a file named :- .xsession
    E.g:- cd /home/tarun
  3. and run the below:-

Done

GUI is got installed on Kali-Linux.

Thank you Guys for Reading, Share it If you think this blog helps you.

In Case of Any Error or Issue, you can connect me on Linkedin:

https://www.linkedin.com/in/tarun-mittal-1507/

UPDATE:-

Sep-2022:-

Thanks Guys for reading and following the blog, one guy followed and he faced the issue and he connected with me on linkedin and because of that i updated this blog.

--

--

tarun mittal
tarun mittal

Written by tarun mittal

Currently Working As A DevOps Engineer. Loves to Troubleshoot.

Responses (1)