6

After installing chrome-remote-desktop on Ubuntu 18.04, I had issues with google-chrome not opening correctly and also terminal would not open. Also, trying to remote in would give me a blank screen on the client machine.

After following the instructions here, https://medium.com/@vsimon/how-to-install-chrome-remote-desktop-on-ubuntu-18-04-52d99980d83e remote desktop works flawlessly, with the existing X session on the host machine.

The question is how can I make remote desktop work with using a new X session, as its intended by the default chrome-remote-desktop script?

electror7
  • 106

2 Answers2

5

Short answer: yes, but you need to use cinnamon for remote sessions. Local users can use Unity or whatever they want.

Symptoms: in remote session: xterm runs, gnome-terminal/nautilus does not.

Short fix:

sudo DEBIAN_FRONTEND=noninteractive \
    apt install --assume-yes cinnamon-core desktop-base

sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/cinnamon-session-cinnamon2d" > /etc/chrome-remote-desktop-session'

Long answer.

I recently tried to get chrome-remote-desktop on Ubuntu 20.04, and found that most of the instructions either ignore issues with sessions (gnome-terminal does not open, etc); or patch /opt/google/chrome-remote-desktop/chrome-remote-desktop with FIRST_X_DISPLAY_NUMBER = 0, etc, which is not helpful if I want to sign in with multiple accounts at the same time.

There are Google instructions on installing chrome-remote-desktop on virtual instance: https://cloud.google.com/solutions/chrome-desktop-remote-on-compute-engine which insist on disabling the display manager. I decided to follow that guide but without disabling display manager. And it worked!

Step-by-step:

  1. Create additional [local] user accounts. Account which is used to setup remote access won't be accessible for regular sign in (at some point I was getting an error message from remote desktop where it blamed a bug in display manager; I tried gdm3, lightdm, and sddm with no luck).

Note: if you forgot to create an additional [local] account you can "unlock" it by visiting https://remotedesktop.google.com/ on another machine and deleting remote device you set up.

2.

# Install cinnamon
sudo DEBIAN_FRONTEND=noninteractive \
    apt install --assume-yes cinnamon-core desktop-base

Select default session

sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/cinnamon-session-cinnamon2d" > /etc/chrome-remote-desktop-session'

Download remote desktop.

wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb

apt install will install it together with dependencies.

sudo apt install ./chrome-remote-desktop_current_amd64.deb

Allow this user to setup machine for remote access.

You will be logged in by this user when using chrome remote desktop.

It is possible to list multiple users in this group, and access your machine with multiple remote sessions simultaneously.

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

Install Google Chrome (if not installed yet)

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt install ./google-chrome-stable_current_amd64.deb

  1. Go to https://remotedesktop.google.com/, and setup this machine for access.

  2. Reboot.

There are extra steps listed at https://cloud.google.com/solutions/chrome-desktop-remote-on-compute-engine (like enabling clipboard), but I did not try it.

I was able to login to my machine with two users simultaneously using remote desktop (and run gnome-terminal in the cinnamon session), and third user running Unity desktop directly on machine.

0

As I answered on Stack Overflow with an example for KDE:

This problem most likely is caused by an active session on the host. Try to kill the active session to make sure this is the problem. SSH into the host and run the following:

qdbus org.kde.ksmserver /KSMServer logout 0 0 0

Launch using Plasma by KDE, and see if it's working.


Follow the instructions on using the same session: