Use Chrome Remote Desktop on Linux

Although it is not limited to Chrome Remote Desktop, the operating side requires a client application and the operated side requires a host application. This time, I will use Windows on the client side and Linux (Ubuntu 20.04) on the host side.

The host side can be either an actual machine or a VM. You can make a remote desktop connection on the GCP VM in the same way. If you want to use GCP VM, install Ubuntu desktop version first.

Install Chrome Remote Desktop Host

Download and install Chrome Remote Desktop Host on the host side (Ubuntu).

$ wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
$ sudo dpkg --install chrome-remote-desktop_current_amd64.deb
$ sudo apt install --assume-yes --fix-broken

You can now install it. Furthermore, change the user account information as follows. (I forgot this when setting it for the first time, and after restarting, I encountered a phenomenon that I could not log in)

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

Once you've done this, you're back to client-side work.

Working with Chrome Remote Desktop client

https://remotedesktop.google.com/headless?hl=ja

From this page, select the Google account you want to use to connect. As you proceed with login operations, commands are displayed as shown below. 設定画面.png

DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="XXXXXXX_XXXXXXX_-XXXXXXX" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)

It comes out like this. Since the host side is Ubuntu this time, enter the command of the "Debian Linux" part as it is into the console of Ubuntu which is the host. You are redirecting screen output.

When you enter this command, you will be prompted to enter a PIN of at least six digits. Set it and don't forget it.

Connection

When you enter the Chrome Remote Desktop page again from the client side, the following is displayed.

image.png

When connecting for the first time, you will be asked to enter the PIN you requested earlier. Enter the set PIN code and the remote connection is successful.

trouble shooting

Trouble experienced.

Do not accept sudo when entering from Chrome Remote Desktop

This is my experience when I entered a Linux VM on GCP with Remote Desktop.

When trying to execute the sudo command from Terminal on the GUI

(User name) is not in the sudoers file.  This incident will be reported.

Is rejected, but if you do it from the GCP console, it will pass.

$ sudo usermod -G sudo $(whoami)

Add users from the GCP console.

$ sudo cat /etc/group

After that, if you log out and log in again, you can sudo on the GCP VM.

Chrome Remote Desktop can't connect after reboot

Events on GCP.

After rebooting from ssh, the VM instance seems to have started, but Chrome Remote Desktop does not work.

再起動後にリモートデスクトップ不可.PNG

Like this.

$ sudo systemctl status chrome-remote-desktop

I check it, but there is no problem. It is Active.

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

I forgot this command.

Frequent dialogs asking for a password

Occurs on both VMs and actual machines. The following dialogs appear frequently, which is annoying.

--Authentication required to create a color profile --Authentication required to create a color managed device

I wrote an independent article about this, so please refer to that. Clear the dialog that appears when entering Linux with Remote Desktop

Recommended Posts

Use Chrome Remote Desktop on Linux
Use Github Desktop on Linux
[Linux Mint 20] Remote desktop connection / connection
Use sshpass on Amazon linux2
Use Linux on Windows 10 (WSL2)
Use host.docker.internal on linux (docker-compose required)
Problems with Chrome after suspending on Linux desktop KDE + Nvidia
Use Linux commands on Android devices
Use Numpy, Scipy, scikit-learn on Amazon Linux
I want to use Linux on mac
Connect to GNU / Linux with Remote Desktop
Why use linux
Comfortable use of Magic Trackpad 2 on Ubuntu desktop
Daemonizing processes on Linux
jblas on Arch Linux
Install Debian 10 to use Remote Development on BeagleBone Black
How to use C216 Audio Controller on Arch Linux
Linux (WSL) on Windows
NAT router on Linux
Native playback of DSD sound source on Linux desktop
Use pyvenv on Windows
Develop .NET on Linux
Wake on lan on Linux
Preparing to use Ansible on an existing Linux server
I want to use OpenJDK 11 on Ubuntu Linux 18.04 LTS / 18.10
Monitor traffic on Linux
Update vscode on linux
Use Ansible on Windows
Try NeosVR on Linux
Use QuTiP on Windows
Use pip on Windows
Check capacity on Linux
[Tips] How to use iPhone as webcam on Linux
LiveUSB creation on Linux
Linux operation on Win10
[For beginners] How to use for statements on Linux (variables, etc.)
When you want to use python2.x on modern Gentoo Linux
What to do if you can't use WiFi on Linux
Install Minecraft on Arch Linux
Use matplotlib on Ubuntu 12 & Python
Install Linux on your Chromebox
SoftwareRAID 0 on SereneLinux (Ubuntu 18.04 Desktop)
Downgrade Mcomix on Arch Linux
Use music21 on Google Colaboratory
Monitor disk usage on Linux
Install the JDK on Linux
Elixir = Comfortable on Linux Mint
Recording and playback on Linux
Check TTL on Linux router
Read core voltage on Linux
Easy df command on Linux
Install Chrome on CentOS 7 series
Install tomcat 5.5 on Amazon Linux.
Use matplot libwidget on mac
Use WDC-433SU2M2 with Manjaro Linux
Install Homebrew on Amazon Linux 2
Paste the link on linux
Install strongSwan 5.9.1 on Amazon Linux 2
Use Python on Windows (PyCharm)
Linux environment construction (on WSL environment)
Run FreeBSD on Linux + qemu