Do the following steps to access Remote Desktop of you VM instance from GCP
- update the package manager data and install wget and tasksel
sudo apt update
sudo apt install --assume-yes wget tasksel
- Download and install the Debian Linux Chrome Remote Desktop installation package:
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo apt-get install --assume-yes ./chrome-remote-desktop_current_amd64.deb
- Install Ubuntu desktop environment
sudo tasksel install ubuntu-desktop
- Set your Chrome Remote Desktop session to use Gnome, which is the default desktop environment for Ubuntu:
sudo bash -c ‘echo “exec /etc/X11/Xsession /usr/bin/gnome-session” > /etc/chrome-remote-desktop-session’
- reboot your Ubuntu VM instance.
sudo reboot
The VM instance will reboot. After reboot, open the SSH windowe. Now you have to Configure the Chrome Remote Desktop
- In the SSH window for your VM instance, download and install the Debian Linux Chrome Remote Desktop installation package.
sudo apt update
curl -L -o chrome-remote-desktop_current_amd64.deb \
https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install --assume-yes ./chrome-remote-desktop_current_amd64.deb
-
On your local computer, go to this link : Chrome Remote Desktop
-
Click
Set up via SSH>Next>Begin>Authorize
- Now you get the command to set up and start the Chrome Remote Desktop service on your VM instance. Copy the command for Debian Linux.
- Paste the command to the SSH window that connects to your VM instance. Run the command.
6.Enter a 6 digit PIN when prompted. This PIN will be used when you log into the VM instance from your Chrome. If you see errors like Fail to read or No net_fetcher, ignore them.
-
Click the
Remote Accessoption from left bar, then choose the item from the list, her in this case it isubuntu-desktop -
Then enter the 6 digit pin, which we gave at 6 and there you go!



GOOD ENOUGH