Running VNC on AWS EC2

Running VNC on AWS EC2 instance

Running VNC on AWS EC2 instance

To try EBLearn and to see the result in GUI, I want to use VNC to see Ubuntu Desktop instead of SSH command line. 

According to this article. Here is the thing you need to do:

  1. Intall Ubuntu Desktop
    $ sudo apt-get update
    sudo apt-get install ubuntu-desktop
  2. Install vnc4server
    sudo apt-get install vnc4server
  3. Start vnc
    vncserver :1
  4. Edit config 
    $ vi ~/.vnc/xstartup

    to become:



    gnome-panel &
    gnome-settings-daemon &
    metacity &
    nautilus &
    gnome-terminal &

    *this tips is from another article.

  5. After modifying xstartup file, restart VNC server:

    $ vncserver -kill :1
    $ vncserver :1

  6. Add a new inbound TCP rule for port 5901 in your EC2 security group that you're using in the instance
  7. Make connection routing through

    $ ssh -i /Users/[username]/Desktop/[EC2 private key].cer [EC2 Instance IP] -L 5901/
  8. Open Safari, type vnc:// , wala! You're done!



Try EBLearn - Face Detection tool - on AWS EC2

NYU EBLearn Face Detection Demo

NYU EBLearn Face Detection Demo

Try and run NYU EBLearn on AWS EC2 Ubuntu instance.

1. If appear 

cp: cannot stat `ebl2matlab': No such file or directory
make: *** [bin_install] Error 1

Just ignore it.

According to this, - "in ubuntu, there is no error in the log. ebl2matlab is optional and was not compiled. Hence, your installation was successful in ubuntu."

2. When make test

detect: cannot connect to X server 

That's might because of EBLearn try to show some graphic result on Ubuntu, however AWS EC2 does not provide a screen. So, the solution, according to this, is

disable QT and compile by 
going to the eblearn/tools folder
and run the command
export NOQT=1 && make

That's it!

Now you should be able to run 


  1. Unit testing:


    make test
  2. Face detection demo:
    ./bin/detect tools/data/face/best.conf


JC @ Memora