Install Chrome Remote Desktop on a Headless Ubuntu 22.04 Server

Even if this is not the first post in order by creation date, it is the first in a logical sequence of steps to create the simple virtual environment I’m up to build. I started with a fresh installation of Ubuntu server 22.04 with an installed SSH server.

Connect to the server via SSH with a non-root sudo user. Install the update and wget as a requirement.

sudo apt update

sudo apt-get install -y wget

Download the .deb Debian Linux Chrome Remote Desktop installation package directly from Google.

sudo wget

Install the package with its dependencies

sudo dpkg --install chrome-remote-desktop_current_amd64.deb

sudo apt install -y --fix-broken

I decided to install XFCE as an X Windows System Desktop Environment. To do so, the command is:

sudo DEBIAN_FRONTEND=noninteractive apt install -y xfce4 desktop-base

DEBIAN_FRONTEND=noninteractive is necessary to prevent the server from prompting the keyboard configuration.

Configure Chrome Remote Desktop to use XFCE as the default.

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

XFCE’s default screen locker, Light Locker, must be fixed to work with Chrome Remote Desktop. The screen goes blank and can’t be unlocked. To avoid the inconvenience, I installed XScreenSaver as an alternative.

sudo apt install -y xscreensaver

xscreensaver gave me problems in login in so I removed it after an initial test (I don’t have a real explanation for this).

sudo apt-get remove xscreensaver

Now to use the remote desktop, I need to configure it. To do so, I create a new group.

sudo groupadd chrome-remote-desktop

and I put my user in this newly created group.

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

On my local computer, I copy the script to configure the service and paste it into the server as a command.
The code to copy is found at this link:

You are required to insert a PIN, and then you will find the newly added server among the others.