Problems
Chrome remote desktop creates a new session for remote session, which is not suit my needs, like Windows's remote, I need to "resume" the current session of the original desktop.
Solutions
1. In the host Ubuntu machine, install chrome remote desktop, using the deb provided by Google making use of the command sudo dpkg -i chrome-remote-desktop_current_amd64.debYou should see status "Online" in the device list, if it does not,
- Check whether the chrome remote desktop status is on by sudo systemctl status chrome-remote-desktop. It should output as follows
- There are cases where "Loaded: masked (Reason: Unit chrome-remote-desktop.service is masked.)" error occurs, if so, run sudo rm /lib/systemd/system/your_app.service to remove the systemd service of the chrome-remote-desktop and reload the systemd daemon by running sudo systemctl daemon-reload. Re-check the status of the chrome-remote-desktop and active status should be achieved
Updated: 4/6/2024
As of chrome remote desktop version v121+,
1. Download the patch file
2. Remove the first 4 lines of the patch file
3. Navigate to /opt/google/chrome-remote-desktop, apply the patch by "sudo patch -Np1 -i /path/to/use_existing_session.patch", update the FIRST_X_DISPLAY_NUMBER variable to the one output using "echo $DISPLAY", and also update value of ~/.config/chrome-remote-desktop/Xsession to the DISPLAY value
4. Update the XSession to disable wayland, set WaylandEnable to false, run "sudo systemctl restart gdm3" to take effect.
5. Re-login Ubuntu (re-configure the chrome remote desktop where possible) "DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/0AdLIrYeNopk9TMNaSyMPAXCr25kRpDPi5oUt9w7IJkC5ALTp75JlaKajanli3b3XQ_RDlw" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)"
Updated: 30/6/2025
As of latest "Ubuntu chrome remote" current session solution, just follow the guide to apply the update of file "/opt/google/chrome-remote-desktop", following the instruction marked here , (backup as following)
rm ~/.config/chrome-remote-desktop/Xsession
echo $DISPLAY | tr -d ':' >> ~/.config/chrome-remote-desktop/Xsession && cd /opt/google/chrome-remote-desktop
sudo cp chrome-remote-desktop chrome-remote-desktop_bak
sudo wget -qO- "https://gist.githubusercontent.com/nightuser/2ec1b91a66ec33ef0a0a67b6c570eb40/raw/b09250dcc9a28f09de93192a948dffb4963c2aca/use_existing_session.patch" | tail -n +5 > ~/use_existing_session.patch
sudo patch -Np1 -i ~/use_existing_session.patch
rm ~/use_existing_session.patch
systemctl restart chrome-remote-desktop@$USER.service
systemctl enable chrome-remote-desktop@${USER}.service
systemctl status chrome-remote-desktop@$USER.service
References
- Use existing session chrome remote desktop patch (Note: the .patch file cannot applied directly to the origin "/opt/google/chrome-remote-desktop/chrome-remote-desktop" , manual applying the differences is necessary.)
- How to Install chrome-remote-desktop on Arch
- systemd: How to unmask a service whose unit file is empty
- Disable wayland support
- Sample configuration files