54

I am trying to install Chrome Remote Desktop and I'm reading the FAQ on how to install it, but it says nothing much AFAIK.

With Ubuntu Gnome 14.04, what should be the content of the .chrome-remote-desktop-session file?

* Edit *

I created the required .chrome-remote-desktop-session file with a single line :

gnome-session

Howerver, starting a remote desktiop session only result with a blank screen. I have tried searching for a solution, but none of them are up-to-date, or gives a helpful hint for a solution. I also tried gnome-session-classic, but without luck, too.

1
  • As a temporary solution one could kill the active session SSH'ing into the host and running a command like qdbus org.kde.ksmserver /KSMServer logout 0 0 0 for KDE. Jun 27, 2023 at 3:01

6 Answers 6

87

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).

29
  • 3
    Solution working with Ubuntu 16.04! Jun 14, 2016 at 2:21
  • 3
    I'm still having issues with this in 18.04. I followed this blog post (authored on 2018.05.03, pretty recently) - 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 - dropbox.com/s/6w2nepbm4pmtc9l/chrome-remote-desktop?dl=0 Any ideas? May 3, 2018 at 14:51
  • 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
    May 4, 2018 at 16:04
  • 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) - dropbox.com/s/8opz5dhq2umjn4c/chrome-remote-desktop-v2?dl=0 May 5, 2018 at 15:40
  • 2
    2019, 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
    Jul 18, 2019 at 14:51
11

The chrome-remote-desktop application works just fine with linux generally and Ubuntu specifically. It however does NOT play nice with LightDM and Unity. Ubuntu Bug #1274013, and the related bug in comment #3 shed some light on this: gnome-session is broken without 3d acceleration.

To resolve this I added LXDE to my ubuntu installation on my desktop:

sudo apt-get install lxde

I still am able to use the standard Unity Desktop when accessing my desktop locally, but the I have the LXDE desktop to use via chrome-remote-desktop remotely.

This is accomplished by creating (or altering) the ~/.chrome-remote-desktop-session file to read

exec /usr/bin/startlxde

Then, to shutdown and restart the Chromoting service, run from terminal

sudo service chrome-remote-desktop restart

Now attempt to remote in from another computer. This should start a virtual session in LXDE even if the remote computer is currently logged in under Unity/LightDM.

3
  • Had OP's problem, and this solution worked great for me.
    – CompEcon
    Nov 22, 2014 at 12:10
  • Can you be more specific about adding the startlxde command? I put it in, and it made the Google app glitch like an error. I can't get it to start lxde, even when I boot up with lxde, remote desktop still goes to unity. Oct 24, 2015 at 20:38
  • Worked as a charm.
    – Thomas
    Feb 19, 2016 at 12:56
2

Here is my story of how I enabled it on ubuntu 16.04 server:

  1. installed the remote desktop deb
  2. installed xorg dummy drivers apt-get install xserver-xorg-video-dummy xserver-xorg-input-void
  3. added to /etc/environment:

.

CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES=1920x1080
CHROME_REMOTE_DESKTOP_USE_XORG=1
CHROME_REMOTE_DESKTOP_LOG_FILE=/tmp/crd.log
  1. reboot
  2. added group chrome-remote-desktop and added my user to this group
  3. added xfce: apt-get install xfce4 and

.

cat > ~/.chrome-remote-desktop-session
exec /usr/bin/startxfce4
  1. enabled debug in the chrome remote desktop extension by opening its "main.html" page and made sure everything is okay there

this works as a terminal server with separate desktop for each user with auto-resizing of the desktop as expected

0

As far as I'm aware, Chrome remote desktop cannot be a host/server on linux/ubuntu - it can only be used as a client to view instances of remote-desktop on Mac / Windows / Chrome machines.

I've only ever used it for that use case - to connect to OSX / Windows boxes from my Ubuntu work laptop. In those instances, the viewer is just accessed by installing via the chrome extension located here: https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en

EDIT: Since the remote-desktop host feature is currently in beta, it's not accessible in the chrome-stable installation, which is why I've not seen it listed and there is no option to enable remote connections in the stable installation, as far as I can tell.

5
  • 1
    What about the .deb package it requires to install; chrome-remote-desktop? Where does it say, in the FAQ, or anywhere on Google, that Google Remote Desktop cannot be used as a host on Ubuntu? Jul 13, 2014 at 19:46
  • When opening the remote-desktop app on chrome on Ubuntu (latest stable), there is no option to add the current machine as a host, whereas on OSX this option is present. Although this is an older article, there is mention here that there is no host support for linux yet: productforums.google.com/d/msg/chrome/VT2_wLZ3ppc/QcVbd1o24F8J
    – Andrew
    Jul 14, 2014 at 6:48
  • My apologies, turns out it's currently in beta, and not available in chrome-stable, as far as I can tell.
    – Andrew
    Jul 14, 2014 at 6:57
  • if you follow the FAQ that I posted in the question, in instructs how to configure it (it doesn't say Chrome stable or Chromium), and it is possible to add the current machine as host. However, the end result is what I explained in the question as well. I understand the beta nature of the plugin and, for this reason, I'll leave this question open until a solution, or otherwise a stable release, makes it work. Jul 14, 2014 at 9:41
  • 1
    Fair enough :) I'll see if I can give it a go at some point as well, and let you know how I get on - I've been waiting for the host capability of the remote desktop extension for some time, and I'm keen to give it a spin.
    – Andrew
    Jul 14, 2014 at 10:42
0

As the desktop environment on my computer is LXDE and not gnome, I am using the following:

#/usr/bin/openbox-session
#/usr/bin/lxsession -s Lubuntu-Netbook -e LXDE
#/usr/bin/lxsession -s Lubuntu -e LXDE

## This session was created for other purposes such as a non shared desktop 
#/usr/bin/lxsession -s ChromeDesk -e LXDE

######
## For Desktop Sharing
######

/etc/X11/Xsession

I followed the guide found here: https://support.google.com/chrome/answer/1649523?hl=en under the heading

Set up Chrome Remote Desktop |subheading>Enable Remote Access to Your computer | minor heading > Linux

Create a file called .chrome-remote-desktop-session in your home directory. This should be a shell script that starts your preferred desktop environment. Find the correct command to start the desktop by looking in /usr/share/xsessions/ for the desktop entry.

For example, the ubuntu-2d.desktop file has the line:

Exec=gnome-session --session=ubuntu-2d

The text after ‘Exec=’ is the command to start the session. It should be passed (using quotes if necessary) as a parameter to the lightdm-session script. In this case, the correct command would be:

exec /usr/sbin/lightdm-session "gnome-session --session=ubuntu-2d"

Including a couple of links one to another thread on the subject and also linking to an article write up created for my own reference...

https://productforums.google.com/d/msg/chrome/8PMxG69VJ6o/CVr0AgTCWm8J

0

In my case, because I already had the session and X running, I was losing the connection after a while. Looking to the logs, it stops after 15 attempts because was already running. So I had to comment another line.

In sum, on /opt/google/chrome-remote-desktop/chrome-remote-desktop:

Set the display number to 0:

FIRST_X_DISPLAY_NUMBER = 0

Comment:

#while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1

And in my case, I also commented this:

#relaunch_times.append(x_server_inhibitor.earliest_relaunch_time)

I don't fully understand the issue but works like a charm.


@Andrew You can use the CRD as host/server on linux. Try this: Check your xsession (lubuntu example):

grep '^Exec=' /usr/share/xsessions/Lubuntu.desktop

And put that on the chrome-remote-desktop-session file:

cat > ~/.chrome-remote-desktop-session
exec /usr/bin/lxsession -s Lubuntu -e LXDE

After this the option to add you machine as host becomes available on CRD.

Running Lubuntu (Ubuntu 15.10)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .