This answer originates from Rob Calistri's comment in François Beaufort's G+ post. Due credit to the source. If you've updated Ubuntu (or Ubuntu Gnome) recently, instead of a blank screen, you likely see just wallpaper without any panels when connecting via Chrome Remote Desktop. This modification forces Chrome Remote Desktop to use the existing X Server instead of creating new desktops.
After installing the Debian package chrome-remote-desktop_current_amd64.deb
, make sure the current user is part of the chrome-remote-desktop
group:
sudo usermod -a -G chrome-remote-desktop username
Stop Chrome Remote Desktop:
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
Backup the original configuration:
sudo cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig
Edit the config file (sudo vim
, gksudo gedit
, etc):
gksudo gedit /opt/google/chrome-remote-desktop/chrome-remote-desktop
Find DEFAULT_SIZES
and amend to the remote desktop resolution. For example:
DEFAULT_SIZES = "1920x1080"
Set the X display number to the current display number (obtain it with echo $DISPLAY
from any terminal). On Ubuntu 17.10 and lower, this is usually 0
, and on Ubuntu 18.04, this is usually 1
:
FIRST_X_DISPLAY_NUMBER = 0
Comment out sections that look for additional displays, as shown here:
#while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
Reuse the existing X session instead of launching a new one. Alter launch_session()
by commenting out launch_x_server()
and launch_x_session()
and instead setting the display environment variable, so that the function definition ultimately looks like the following:
def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
#self._launch_x_server(x_args)
#self._launch_x_session()
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
Save and exit the editor. Start Chrome Remote Desktop:
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
Caution: When this answer was originally written for Ubuntu (Gnome) 14.04 in February 2015, there existed an issue where Chrome Remote Desktop somehow caused deja-dup-monitor to go wild and consume all of your system memory (see launchpad bug). This made Ubuntu essentially unusable after connecting/disconnecting via Chrome Remote Desktop.
Update November 2016: The instructions have been amended based on further updates by Rob Calistri in the above-linked G+ post comments. With Ubuntu 16.04, the deja-dup-monitor bug appears to be resolved (it never exceeded 2.8 MiB of memory usage in my last test).
Awesome solution, worked perfectly. A note on the warning, I had to remove deja-dup-monitor. You can find it in the software center, search backup. – aw04 – 2015-01-02T22:26:08.513
I have priviously successfully used this method on Ubuntu 12.04. Now on a clean install of Ubuntu 14.04(32 bit), I have broken the installation(twice) by doing this and nothing else. -Ubuntu restarts in complete white screen with no login screen or desktop (default console Ctrl-Alt-F7). – hpekristiansen – 2015-10-22T10:54:28.203
Had this problem after replacing the horrible Unity interface with xfce, this solution worked perfectly, thanks! – klogd – 2016-03-02T14:29:14.100
3Solution working with Ubuntu 16.04! – Vitor Abella – 2016-06-14T02:21:01.530
Along with @CrandellWS answer below, I got this working on Lubuntu 16.04. Thank you so much! – Alex P. Miller – 2017-01-06T17:52:17.487
Thanks, this solution makes chrome remote desktop work much better with Unity in Ubuntu 16.04 – Jon Onstott – 2017-01-15T19:41:23.123
is the resolution required to be set to something specific or is this just a preference? – evan54 – 2017-05-28T19:00:43.243
I cannot get this to work, I'm not sure I'm editing the file 100% correctly - does anyone have a copy of the corrected file I can use? – mcmillab – 2017-06-13T23:35:40.340
will this still work if the system is rebooted, and no-one is logged in? In that case isn't there no session for it to use? – mcmillab – 2017-06-14T04:06:47.583
Worked for me on the up-to-date version of Debian 8.9 jessie, chrome remote desktop 63. Did not change the DEFAULT_SIZES variable. Thanks a lot! – denis-sumin – 2017-11-19T13:34:58.853
still effectively works in 17.10 LXDE -- for some reason it's not finding ARANDR but you can muck with that variable as well. Who the hell doesn't have a 1920x1080 monitor today.... – Ron Thompson – 2018-02-09T00:21:23.993
3
I'm still having issues with this in 18.04. I followed this blog post (authored on 2018.05.03, pretty recently) - https://medium.com/@akarpo/hi-vicken-c1fcea4514d6
My feedback along with a sample config is at the bottom. After I enter a PIN and attempt to enable Remote Connections, it spins and spins saying 'Enabling Remote Connections' but nothing ever finishes/takes.
My config file - https://www.dropbox.com/s/6w2nepbm4pmtc9l/chrome-remote-desktop?dl=0
Any ideas?
3@AlexKarpowitsch I tested this on Ubuntu 18.04 and the logfile under /tmp was clear on the problem: the X display number is not correct. I've updated the answer to reflect that a user should obtain the current X display number instead of assuming it is zero. Hope this helps. – MDMower – 2018-05-04T16:04:45.213
2
@MDMower - that worked! Thank you so much. For anyone who might have found this via Google, I've included a link to my revised config (I only have a single monitor, 1920x1080 resolution) - https://www.dropbox.com/s/8opz5dhq2umjn4c/chrome-remote-desktop-v2?dl=0
– Alex Karpowitsch – 2018-05-05T15:40:12.653@MDMower I change the
FIRST_X_DISPLAY_NUMBER
to 1 in Ubuntu 18.04, but it is still not working. After waitingEnabling remote connections for this computer...
for 20 mins, I got an error message sayingFailed to start remote access service.
. Can you help me? – Haozhe Xie – 2018-06-04T13:07:49.687Successful attempt in Ubuntu 18.04 using this method, but now all I get is blank screen. – Hendra Anggrian – 2018-09-29T10:28:55.180
Works perfectly in Ubuntu 18.04! Note that
echo $DISPLAY
for me does indeed return:0
, however. Also, what if I do not want to control the active desktop? I'd really like to be able to work in a background session on the host PC while my wife works simultaneously on that pc in the main foreground session. Any way to make this happen? The problem is that without doing your changes you specify above, every time I go to log in to the remote session, it loads the Ubuntu gnome login screen, but then when I type in my password, the session won't show up.It just stays on the gnome login screen. – Gabriel Staples – 2019-03-31T16:49:14.12312019, Ubuntu 19.04 and it still works beautifully. Without this mod I was having serious issues with some apps like the terminal going into the remote screen despite me being on the host rendering the PC unusable. This is perfect, thanks. – Ahdee – 2019-07-18T14:51:46.887
Please explain what you're asking us to do here. I don't understand what you're telling us to do in this step: Find
DEFAULT_SIZES
and amend to the remote desktop resolution. – Gabriel Staples – 2019-09-15T05:59:13.177FYI; related: https://support.google.com/chrome/thread/2067278?hl=en
– Gabriel Staples – 2019-09-15T06:11:07.383Also, good write-up on Medium.com referencing this answer: https://medium.com/@vsimon/how-to-install-chrome-remote-desktop-on-ubuntu-18-04-52d99980d83e
– Gabriel Staples – 2019-09-15T07:04:47.0972019, Ubuntu 16.04 and it still works beautifully. – tyumru – 2019-09-29T18:18:59.333
It no longer seems to work on Ubuntu 18 after latest chrome remote desktop update came through recently :(: https://askubuntu.com/questions/1189710/cant-connect-to-chrome-remote-desktop-on-ubuntu-18
– Gabriel Staples – 2019-11-18T08:50:37.010This worked for me on Ubuntu 18 with latest version of chrome remote desktop (installed today). – Timtech – 2019-12-03T03:06:05.753
Note that if you ever find you can no longer click on an external hard drive in your GUI file manager anymore to automatically mount the drive, Chrome Remote Desktop could be to blame. See here: https://askubuntu.com/questions/1196248/automount-when-clicking-on-disks-in-gui-file-manager-suddenly-stopped-working-in/1196273#1196273.
– Gabriel Staples – 2019-12-15T06:24:27.670hit the same problem and stuck for days~! After the suffer, I would say, if Google Remote Desktop is not a must-to-have, remove it. This is the easiest way to fix the problem. – Franva – 2019-12-20T23:27:11.850