/AWS

AWS practice

AWS

AWS practice

EC2 launch

  • As the memory usage of VS code on mate core is over 1G, we need to install at least t2.small
    • vscode + file browser(Caja) + terminal + chrome browser(2 open tabs) + Htop
  • t2.small looks just manageable for small java test program.
  • t2.medium is recommended...

Htop on t2.small

GUI using VNC with Amazon EC2 Instances

  • Install GUI on ubuntu server of EC2

    • using 'tasksel'
      sudo apt-get install tasksel
      
    • check the list of tasks
      tasksel --list-tasks
      
    • selected mate core and install it on the server
      sudo apt update
      sudo apt upgrade
      sudo tasksel install ubuntu-mate-core
      
    • install vnc4server
      sudo apt-get install vnc4server
      
    • set vncserver password
      vncserver
      
    • modify ~/.vnc/xstartup as below
      #!/bin/sh
      # Uncomment the following two lines for normal desktop:
      unset SESSION_MANAGER         ## uncomment
      exec /etc/X11/xinit/xinitrc   ## uncomment
      
      [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
      [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
      xsetroot -solid grey
      vncconfig -iconic &
      
      ## commented out following two lines
      #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
      #x-window-manager &
      
    • Reboot the instance
    • ssh connection with turneling option (ex: rmote forwarding port:5901, vncserver port:5901)
      ssh -L 5901:localhost:5901 -i <filename.pem> ubuntu@<public ip or DNS>
      
    • vnc connection (ex: Mac)
      vnc://localhost:5901
      
  • ref

VNC connection to AWS linux instance from MS windows

Using VS code on ubuntu mate core

Appendix: