0

I have used an instance with ubuntu-server of AWS and would like to use GUI either so I did the following operations referring,

https://aws.amazon.com/premiumsupport/knowledge-center/connect-to-linux-desktop-from-windows/ How To Set Up GUI On Amazon EC2 Ubuntu server

It could be summarized as following. a) Installed ubuntu-desktop and vnc4server b) Changed the security settings in AWS console to open the ports 5901, 5902 c) Changed the security settings in my computer to open the ports for outbounding

However, connecting to the ubuntu it works but I could see only the screen full with a gray color.

What should I do further?

Community
  • 1
  • 1
Jason Huh
  • 39
  • 5

2 Answers2

1
  1. Boot up EC2 - Ubuntu 14.04 (LTS)
  2. Once the instance is all boot up, update it:
    sudo apt-get update
    sudo apt-get upgrade

  3. sudo vim /etc/ssh/sshd_config

  4. Change PasswordAuthentication no to PasswordAuthentication yes
  5. Restart SSH: sudo /etc/init.d/ssh restart OR sudo /etc/init.d/sshd restart
  6. Go into root: sudo -i
  7. Set password for ubuntu: passwd ubuntu
  8. Once you've finished setting your password, go back to ubuntu user: su ubuntu & cd
  9. Install Ubuntu desktop functionality:
    export DEBIAN_FRONTEND=noninteractive
    sudo -E apt-get update
    sudo -E apt-get install -y ubuntu-desktop
  10. Install XRDP and XFCE4: sudo apt-get install xfce4 xrdp sudo apt-get install xfce4 xfce4-goodies
  11. Make XFCE4 the default for RDP connections: echo xfce4-session > ~/.xsession
  12. Copy .xsession to the /etc/skel folder so xfce4 is set as the default window manager for any new user accounts that are created. sudo cp /home/ubuntu/.xsession /etc/skel
  13. Allow host port to connect to xrdp.ini: sudo vim /etc/xrdp/xrdp.ini
  14. Change port=-1 to port=ask-1
  15. Restart xrdp: sudo service xrdp restart
  16. Go back to AWS and make sure your security group includes inbound access to RDP 3389
  17. Go into Microsoft Remote Desktop, type in your IP address with: XX.XX.XXX.XX:3389

Check this link - and this Untested but Solutions to 14.x to 15.x:

Update/upgrade with:

sudo do apt-get update

sudo apt-get dist-upgrade

sudo do-release-upgrade
Community
  • 1
  • 1
iSkore
  • 7,394
  • 3
  • 34
  • 59
0

Make it short and simple:

apt-get update –y
apt-get upgrade –y
apt-get  install ubuntu-desktop xfce4 firefox
apt-get install xrdp
echo xfce4-session >~/.xsession

Below lines will solve your problem

THE FIX: edit /etc/xrdp/startwm.sh make the last two lines look like this;

#. /etc/X11/Xsession
. /usr/bin/startxfce4

NOTE: Don't forget to create new users with password. Extremly necessary.

With this you can simply RDP(Remote Desktop) to the Ubuntu GUI machine. Donot forget to open ports in Security Groups and Firewall if any implemented.

Ali
  • 955
  • 9
  • 14