Headless Chrome remote desktop

Topics: ,

Chrome remote desktop is a simple, secure way to set up a remote access to a desktop environment but did you know you can set it up on a Linux server in a headless configuration? You don’t even need a monitor plugged into the machine!

In this post I’ll show you how to set this up on an Ubuntu/Debian server.

Why would you want to do this? There are a few reasons:

  1. Its simple. There is very minimal set up and once it is working, grandma could use it.
  2. You can use it anywhere. Chrome remote desktop works in a browser and even on Android and iOS.
  3. Its secure. You dont yhave to worry about opening up a network firewall or anything, all traffic is passed via google servers.

SSH to your server

All of this will be configured via SSH, so you will need a SSH connection to your server.

Download Chrome remote desktop

Go to https://remotedesktop.google.com/ and select “Set up via SSH”.

On the server, download the current Chrome remove desktop binary;

wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb

Install of the prerequisites

There are a number of prerequisites which are not explicitly stated by Google which you will need to install first. This command will do this trick:

sudo apt install xvfb xserver-xorg-video-dummy xbase-clients xbase-clients python3-packaging python3-psutil libutempter0 python3-psutil python3-xdg

Install Chrome remote desktop

sudo dpkg -i chrome-remote-desktop_current_amd64.deb

Install XFCE4

You’ll need a X11 based desktop environment for Chrome remote desktop to use. XFCE4 is a lightweight, easy choice, which you can install like so:

sudo DEBIAN_FRONTEND=noninteractive \
apt install --assume-yes xfce4 desktop-base dbus-x11 xscreensaver
sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/xfce4-session" > /etc/chrome-remote-desktop-session'

Register the remote

Once installed, you’ll need to register the server as a remote with Chrome remote dekstop. Run the command that it gives you to complete the process.

Done

That is all there is too it. You should be able to access your server via Chrome remote dekstop now!

There is an official guide on setting this up on compute engine, which might be good reference material; https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine