Remote control your BackTrack 5 box using VNC Server

This article discribes how you can remotely connect to your backtrack box using VNC server.

Lets start with making sure your HackBox is up to date by running the command:

apt-get update
apt-get dist-upgrade

Now we can install the server:

apt-get install vnc4server
It now starts installing packages that are needed to run properly.
After it completes we can start the server up and it it should be ready to connect.


The first time you start vnc server you will be promped to create password to login remotely.
(Note: It only accepts 8 Chars as a password. If your password normally is longer, only the first 8 will be used.)

You can now connect to your box using vnc viewer


When I connected for the first time the only thing I saw was a grey background and couldn’t do anything…
Here’s the sollution…
open the file /root/.vnc/xstartup in your favorit editor (I use nano..)

nano /root/.vnc/xstartup

comment out every line in the file and add the following:

xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

Your file should look like this


# Uncomment the following two lines for normal desktop:
# exec /etc/X11/xinit/xinitrc

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &

xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &

Now reboot your box and run the vnc server again, It should work now..

Note: vnc sends your password in clear text over the network. If you use it to connect to a pc on the ‘internet’ make sure you tunnel your traffic over SSH !!

Have Fun….. 😉

4 thoughts on “Remote control your BackTrack 5 box using VNC Server

  1. mike says:

    Thanks a lot for this great article, it works for me. I have BackTrack 5R2 gnome.

  2. Hitoshi says:

    Hi folks! Congratulations BACK2BASIC by article. For those who use Backtrack KDE, replace the line “gnome-session &” by “startkde &”.

    1. Rosli says:

      I still get grey I have to install TightVNC too..please help. Thanx.

      1. back2basic says:

        You can try if that works but I didn’t isntalled it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Previous article

Goodbye CSC ….