Configuring Chrome Remote Desktop with Ubuntu Gnome 14.04

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.


Solution 1:

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

Solution 2:

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.

Solution 3:

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