How to Use a GUI with Ubuntu Linux on AWS EC2

How to Use a GUI with Ubuntu Linux on AWS EC2

This video’s goal is to show you how to use a Microsoft RDP client to securely connect to an Ubuntu instance on AWS EC2, so we can have a GUI for the Ubuntu instance.

1. Configure Free Tier Ubuntu instance on AWS EC2
2. Connect to Ubuntu instance via SSH with PuTTY
3. Add GUI options to Ubuntu
4. Configure PuTTY to Tunnel RDP traffic
5. Test with RDP

*Link referenced:

NOTE: The link above now returns a 404 error. Here are the commands that were copied from the link:

sudo apt update && sudo apt upgrade

sudo sed -i ‘s/^PasswordAuthentication no/PasswordAuthentication yes/’ /etc/ssh/sshd_config

sudo /etc/init.d/ssh restart

sudo passwd ubuntu

sudo apt install xrdp xfce4 xfce4-goodies tightvncserver

echo xfce4-session$ /home/ubuntu/.xsession ##### NOTE: Replace the $ with the Greater Than Sign

sudo cp /home/ubuntu/.xsession /etc/skel

sudo sed -i ‘0,/-1/s//ask-1/’ /etc/xrdp/xrdp.ini

sudo service xrdp restart

50 thoughts on “How to Use a GUI with Ubuntu Linux on AWS EC2

  1. Thanks a lot. Please follow each and every step without fail. It didn't work for me at first then after few days I tried again and it worked

  2. Anyone have the issue of exiting the hui, then trying to reconnect and the putty screen coming up blank? It's not asking me to login and I can't type anything.

  3. You have no idea what you are doing ))) and 84k people still watched and did everything lol… it failed to install the package correctly. this video was autoplay and I was curious what you were doing, and I hate it so much when people have no idea about something and still making videos like they are pro and teaching someone. It was like oh… yea system just entirely crashed, but it's okay since we copy-pasted something from somewhere successfully. When apt or yum fails to install something, it'll complain every time you install or update something.

  4. I had to remove the tunnel bit and enable RDP at 3389 before it would work. The updates were giving errors saying they couldn't find the package and it wasn't until I added an outbound rule that I got that part to work. Eventually got there which was really cool but then it's really slow, if I launch the browser the CPU skyrockets and it actually crashes the instance. What am I doing wrong here? A larger instance might work but in the video he is using a t2.micro with no additional config and the browser is lightning fast??

  5. Like, comment and subscription added. I am inspired by this creative content to continue adding content to my YouTube channel, thumbs up. I AM ADDING A SUBSCRIPTION TO ANYONE WHO LIKES THIS COMMENT AS WELL AS SUBSCRIBING TO MY YOUTUBE CHANNEL Reply by typing "done"

  6. Thank you, it helped! I had to recompile xrdp and xorgxrdp to get it to work on ubuntu 16.04.7 from a mac though. Those are the steps I used:

    $ sudo apt update && sudo apt upgrade # get machine up to date
    $ sudo apt install xfce4 xfce4-goodies tightvncserver # you also could install xrdp, but it not less than 0.9.9 for macs/android connection
    $ echo xfce4-session > /home/ubuntu/.xsession
    $ sudo cp /home/ubuntu/.xsession /etc/skel

    # now follow
    # to compile&install the latest versions of xrdp and xorgxrdp

    # sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini # those settings haved changed in new xrdp versions so this is not necessary anymore
    $ sudo service xrdp restart

    $ sudo passwd ubuntu

    # did not do those 2 steps below and it still worked. Not sure why they were present
    # sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
    # sudo /etc/init.d/ssh restart

  7. If you're having issues with xRDP on macOS not showing text, just click the okay box in the bottom left after inputting user/password.

  8. follow this video along with that other 9 min video to get that orange themed ubuntu we all love. But great explanation, very clear…

  9. Thank you very much sir. I was trying for more than 4 hours and finally found your video. I completed the GUI RD config in less than 15 mins. Please keep doing such wonderful videos. I even doubted since this video is in 2018 i could face some error but None even 1 command you have given failed, it worked flawless. I tried this on 2/Aug/2020. Hatsoff to your sir 🙂

  10. RDP didn't worked for me via localhost:8888, so I enabled RDP at 3389 for source and got it connected via mstsc. Thanks for this great video

  11. Didn't work for me, Remote Connection (15:48) never connects, probably my fault, just posting in case anyone gets stuck there too

  12. I get an error when doing sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini. The error is "can't read /etc/xrdp/xrdp.ini: No such file or directory" Any ideas?

Leave a Reply

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