Skip to content

Instantly share code, notes, and snippets.

@Harry260
Created May 2, 2023 03:44
Show Gist options
  • Select an option

  • Save Harry260/26318d142b0bbf80191ae2799c394284 to your computer and use it in GitHub Desktop.

Select an option

Save Harry260/26318d142b0bbf80191ae2799c394284 to your computer and use it in GitHub Desktop.
Google Cloud Ubuntu RDP with Chrome Remote Desktop

Do the following steps to access Remote Desktop of you VM instance from GCP

1 .Install Chrome Remote Desktop

  1. update the package manager data and install wget and tasksel
sudo apt update
sudo apt install --assume-yes wget tasksel
  1. 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
  1. Install Ubuntu desktop environment
sudo tasksel install ubuntu-desktop
  1. 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’
  1. 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

2. Configuring Chrome Remote Desktop

  1. 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
  1. On your local computer, go to this link : Chrome Remote Desktop

  2. Click Set up via SSH > Next > Begin > Authorize

start page

  1. 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.

authorize page

  1. 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.

  1. Click the Remote Access option from left bar, then choose the item from the list, her in this case it is ubuntu-desktop

  2. Then enter the 6 digit pin, which we gave at 6 and there you go! enter image description here


source

@Gmaillion
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment