Chrome Remote Desktop has been around for quite a while, but now Google offers a .deb
installer with native Linux support via Systemd. This is great because it removes the need to setup VPNs and VNC to remote connect to your machines, or in the case that you need to land a hand to a not so technical savvy family member or friend.
Unfortunately the installer is only for Ubuntu (and Debian based distros), but with a few steps we can get it running on Arch, and (thanks to a patch by nightuser) even configure it to use existing X sessions instead of creating a new one (which is the default behavior).
As expected, the packages exists in the AUR, so the install should be pretty simple.
Instructions
Install
a. Install chrome-remote-desktop
from the AUR
b. Run crd --setup
to configure your connection. Hit any key
c. Select your Desktop Environment (I selected KDE which is what I use) and save the file
d. Press any key again
e. Enter a new resolution if you would like to use something different than the default (1366x768). Save the file
f. You should see the confirmation that the setup is complete
g. Go to https://remotedesktop.google.com/headless and click on ‘Begin’
h. Click on ‘Next’
i. Click on ‘Authorize’
j. Select the Goole account you would like to use
k. Give it permission
l. Click on the copy the button and paste it on your terminal
m. Give the computer a friendly name and a pin to access it
You should get a confirmation that everything went ok
Starting Xvfb on display :20
X server is active.
Launching X session: ['/bin/sh', '/home/victor/.chrome-remote-desktop-session']
Launching host process
['/opt/google/chrome-remote-desktop/chrome-remote-desktop-host', '--host-config=-', '--audio-pipe-name=/home/victor/.config/chrome-remote-desktop/pulseaudio#ae6329c099/fifo_output', '--server-supports-exact-resize', '--ssh-auth-sockname=/tmp/chromoting.victor.ssh_auth_sock', '--signal-parent']
wait() returned (1092272,0)
Host ready to receive connections.
Log file: /tmp/chrome_remote_desktop
Additional Configuration
The additional configuration will allow you to connect to an existing session instead of creating a new one when connecting.
a. Find what display number X is using
$ echo $DISPLAY
:0
b. Create a file in ~/.config/chrome-remote-desktop/Xsession
with the display value
$ echo "0" > ~/.config/chrome-remote-desktop/Xsession
c. Stop the chrome-remote-desktop.service
$ systemctl --user stop chrome-remote-desktop.service
d. Check if it stopped with crd --status
. If it did not, stop it with crd --stop
$ crd --status
CRD status: STOPPED
e. Take a backup of /opt/google/chrome-remote-desktop/chrome-remote-desktop
f. Download the patched /opt/google/chrome-remote-desktop/chrome-remote-desktop
to the same location, or follow the instructions to manually modify your file here.
Note: The patched version was tested with chrome-remote-desktop 81.0.4044.60-1
g. Start the agent with crd --start
so you can see verbose output. You should receive a confirmation when it starts
$ crd --start
Launching X server and X session.
Using existing Xorg session: 0
Launching host process
['/opt/google/chrome-remote-desktop/chrome-remote-desktop-host', '--host-config=-', '--audio-pipe-name=/home/victor/.config/chrome-remote-desktop/pulseaudio#ae6329c099/fifo_output', '--ssh-auth-sockname=/tmp/chromoting.victor.ssh_auth_sock', '--signal-parent']
Host ready to receive connections.
Log file: /tmp/chrome_remote_desktop_20200402_202207_2vtQSb
h. Go to https://remotedesktop.google.com/ from another computer and try to access your computer