Chrome (Google) remote desktop is usually a “no-pain” way of accessing your desktop on Windows or Mac. Google created the application to create a secure connection between two computers using a tunnel. Interestingly, Google has stated the vast majority of the time the data transfers between client and host - not through Google servers. The data is also end-to-end encrypted so even Google cannot see what data is being transmitted (source: https://support.google.com/chrome/thread/32130451/is-the-security-of-remote-desktop-the-same-as-a-few-years-ago-since-it-s-now-a-web-app?hl=en). If you combine your Google account with 2FA - in my opinion, it is one of the most secure remote methods for a full graphical interface.
Setting up Chrome Remote Desktop on Linux is not trivial. If you are reading this post, you are a pretty select group of users. If, like me, you followed the instructions provided by Google, you might find that your remote desktop still doesn’t actually work - this might include having selections for different desktops or your desktop going to a blank screen.
A “true” remote desktop
If you're using Ubuntu 22 with Gnome 42 (Wayland), you can still set up a remote desktop experience using Google Remote Desktop. With Linux, you can have multiple virtual graphical displays, but you can also access a specific display remotely. To do so, you need to specify the display number when starting the remote session. In particular, I wanted the same display that I would be interacting with at my desk on my monitor.
There is a really good chance you might have to reboot your computer to get everything working!
I am basically summarizing the helpful forum post found here: Reddit-CRD help for Linux which itself is a summary of Medium- CRD on Ubuntu 18. I can confirm that as of March 2023, this method still works for CRD under Ubuntu 22 LTS (Gnome desktop; Wayland).
Before we get started, make sure you have Chrome installed on your Linux machine. Install the official Chrome Remote Desktop package. This involves setting a pin. The contents of this package will be installed under:
/opt/google/chrome-remote-desktop
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
Edit the configuration file by running the following command:
sudo nano /opt/google/chrome-remote-desktop/chrome-remote-desktop
Find the line that says DEFAULT_SIZES
and change it to your desired resolution. For example, if you want a resolution of 1920x1080, change the line to:
DEFAULT_SIZES = "1920x1080"
Set the X display number to the current display number by finding the line that says FIRST_X_DISPLAY_NUMBER
and changing it to the correct number. On my system it was “1”. To find the current display number, run the following command:
echo $DISPLAY
On Ubuntu 17.10 and earlier, the display number is usually 0. On Ubuntu 18.04, it's usually 1. If you're using a different distribution, the display number may be different.
Comment out the sections that look for additional displays by adding a #
at the beginning of the lines. The code should look like this:
# while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
Change the launch session function to reuse the existing X session instead of launching a new one. To do this, comment out the launch_server()
line and add the following lines to set the display number:
def launch_session(self, x_args): self._init_child_env() self._setup_pulseaudio()
self._setup_gnubby()
# self._launch_server(server_args)
# if not self._launch_pre_session():
#
# If there was no pre-session script, launch the session immediately.
# self.launch_desktop_session()
# self.server_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
# backoff_time)
# self.session_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
# backoff_time) display = self.get_unused_display_number() self.child_env["DISPLAY"] = ":%d" % display
Save and exit the editor.
Start Chrome Remote Desktop by running the following command:
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
If your screen goes black and you go to the login screen, don’t panic - usually, a reboot will fix things.