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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

tarun mittal
tarun mittal

Written by tarun mittal

Currently Working As A DevOps Engineer. Loves to Troubleshoot.

Responses (1)

Write a response

Hi there,
Superbly helpful article! This helped me out a lot in the past. But do you have any ideas on how to access the Kali GUI from macOS instead of Ubuntu?