Victor Leung
Victor Leung
BlogFlower shop

Install ubuntu desktop on AWS instance with Chrome Remote Desktop

December 02, 2020

Nowadays, we have moved many things to the cloud, including your photos, your files and your servers, what about your desktop environment? Imagine you don’t need to carry your heavy laptop any more, and you can access to the computing power of your laptop from any thin clients, such as a tablet with keyboards at anywhere. It’s possible to achieve using AWS instance with ubuntu desktop and Chrome Remote Desktop. I tried other solutions, such as AWS Workspace or VNC connection, but still, find the Chrome Remote Desktop with the lowest latency and close to native desktop performance. Here is how to do so:

  1. Logon to AWS console and launch an instance using the ubuntu server AMI.

0 buVKSQw mH YXt4o

  1. Once the instance is launched, SSH to your ubuntu server. Update package manager and install wget:

    $ sudo apt update $ sudo apt-get install --assume-yes wget

  2. Download Chrome remote desktop package and install:

    $ wget $ sudo dpkg --install chrome-remote-desktop_current_amd64.deb $ sudo apt install --assume-yes --fix-broken

  3. Next, we install the desktop GUI environment. I have tested out different distro and found that Xfce performs the best without fancy animations over a slow network.

    $ sudo DEBIAN_FRONTEND=noninteractive apt install --assume-yes xfce4 desktop-base

  4. Configure Chrome Remote Desktop to use Xfce by default:

    $ sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/xfce4-session" > /etc/chrome-remote-desktop-session'

  5. Install xscreensaver as an alternative to the default Xfce locker, which doesn’t work with remote desktop:

    $ sudo apt install --assume-yes xscreensaver

  6. Disable display manager as there is no display connected:

    $ sudo systemctl disable lightdm.service

  7. Add your user account to the Linux group then logout:

    $ sudo usermod -a -G chrome-remote-desktop $USER $ logout

  8. On your local laptop browser, open Then follow the steps to set up another computer. You would probably copy command to your AWS command, similar to this:

    DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/xxxxxxxxxxxxxxxxxxxxxxxx" --redirect-url="" --name=

  9. Finally, you can remote connect to your ubuntu desktop and have fun! 0 uIQ5SB5LdglP1fP7 One extra tip is that you can display your screensaver, which is not necessary:

    0 juDwcrXrm1 Ud cX You can now access your desktop environment from anywhere with any device. It’s especially useful as a software engineer who wants to code with a full set of tools as a development environment at any time.

About Victor Leung

Software development professional with expertise in application architecture, cloud solutions deployment, and financial products development. Possess a Master's degree in Computer Science and an MBA in Finance. Highly skilled in AWS (Certified Solutions Architect Professional, Developer and SysOps Administrator), GCP (Professional Cloud Architect), Microsoft Azure, Kubernetes(CKA, CKAD, CKS, KCNA), and Scrum(PSM, PSPO) methodologies.

Happy to connect

Continuous improvement

Copyright © 2023.