Chrome Remote Desktop Remote Access into curently opened sesion

I would like to setup remote access to my Ubuntu 20.04 LTS on xorg home pc.

Remote Support feature works fine, but Remote Access feature logs me in a separate session (default gnome or ubuntu) instead of the currently active session on the computer (if i move the client mouse it’s not visible on the host pc screen).

Is there a simple way to change this behavior?

Asked By: dnikic


Make a config girectory so that chrome-remote-desktop instalation is recognized in the chrome/chromium/firefox addon:

mkdir ~/.config/chrome-remote-desktop
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop

Change specific cofigs to prevents session clobbering:
(Remote will use the same sesion as host.)

sudo nano /opt/google/chrome-remote-desktop/chrome-remote-desktop

DEFAULT_SIZES = "1920x1080"
# while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
def launch_session(self, x_args):
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display

Disable runing of chrome remote sesion before startup to prevent "stuck at login loop bug":

sudo nano /etc/init.d/chrome-remote-desktop
exit 0
[ rest of file]

Add Chrome Remote Desktop to startup applications

name: chrome remote desktop
command:/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
description: starts CRD after login

Solution source:
(Steps 6 and later )
Thank you GObaddie!

Answered By: dnikic

I got rid of the color profile password prompt by following the information here:

The other information above was close but those diffs are apparently for an older version of Chrome Remote Desktop. There’s an update here:

But although that diff applies to the latest Chrome Remote Desktop, even with the other information (including disabling wayland) I am still unable to get Chrome Remote Desktop to start up on Ubuntu 22.04. 🙁

Answered By: Steve Lemke

For ubuntu 22.04 the only thing that changed is the launch_session, it should look like this, the rest are like in the original solution:

def launch_session(self, server_args, backoff_time):
   """Launches process required for session and records the backoff time
   for inhibitors so that process restarts are not attempted again until
   that time has passed.""""Setting up and launching session")
   self.child_env["DISPLAY"]=":%d" % display

   #if not self._launch_pre_session():
     # If there was no pre-session script, launch the session immediately.
   #  self.launch_desktop_session()

The rest should be the same

LATER edit:
I have remade this and I managed to find out what I forgot to tell you:
You should search for get_unused_display_number() and replace return display with return 0 (this ensures you get the same session every time)

Answered By: Claudiu T