How do I configure VNC on my Kali Linode?
I have a newly deployed Kali Linode that I'm looking to install VNC on. How do I go about this?
2 Replies
If you don't already have the VNC Viewer software, download it for your Mac, Windows, Linux or Raspberry Pi here.
The first thing you want to do is to update your Linodes packages and dependencies by running sudo apt-get update && sudo apt-get upgrade -y
. If prompted with a message about ISC, press q
to close the prompt to continue with the upgrade.
Install the xfce deskop on your Kali Linode with command sudo apt-get install xfce4 xfce4-goodies -y
. (Grab a coffee and relax; this may take a minute)
Next, install tightvncserver with the command sudo apt-get install tightvncserver -y
. Upon the completion of the installation, issue the command, vncserver
and when prompted, create a password. The output should be similar to the example below.
┌──(root㉿kali)-[~]
└─# vncserver
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
xauth: file /root/.Xauthority does not exist
xauth: (argv):1: bad display name "kali:1" in "add" command
xauth: file /root/.Xauthority does not exist
New 'X' 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
Kill the vncserver with the command vncserver -kill :1
:
┌──(root㉿kali)-[~]
└─# vncserver -kill :1
Killing Xtightvnc process ID 21178
Create a new configuration file with the command nano ~/.vnc/xstartup
.(Your configuration file may already contain a bash script. If that is the case, replace the content with the one below:
#!/bin/sh
xrdb $HOME/.Xresources
startxfce4 &
Save and exit the file.
~/.vnc/xstartup must have an executable permission set. You may set these permissions with the command chmod +x ~/.vnc/xstartup
and restart the vncserver with the command vncserver
.
──(root㉿kali)-[~]
└─# vncserver
xauth: (argv):1: bad display name "kali:1" in "add" command
New 'X' desktop is kali:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/kali:1.log
(Hold tight, one last step and we're good to go)
Open your VNC Viewer app and select file > New connection. Insert your Linodes IP address under the VNC Server field with the port 5901. It should look something like this 10.10.10.10:5901
. Click ok, open the new connection and accept the unencrypted connection message. You should now be prompted for the password that you set up during the vnc installation and voi·la you should have your GUI Kali Linode.
Hi there,
I have followed all the above points but I get a grey screen when I launch vncviewer (with my linode_ip:5901), I get a grey screen.
The log file created in vnc (kali127.0.0.1:1.log) does not seem to contain anything untoward.
Any help from @Linode really appreciated. Thanks. Phil H.
Seems to be fixed. Perhaps a reboot did the trick