GObaddie / ubuntu_chrome_remote_desktop

How to get barrier and chrome remote desktop working in ubuntu 20.04
62 stars 15 forks source link

New Version: chrome desktop remote and ubuntu 22.04 #5

Open johnnynunez opened 2 years ago

johnnynunez commented 2 years ago

Now it's supported by wayland(chrome remote desktop remote) and def launch session now is different. Could you try to update tutorial for 22.04? thanks! another remote: https://ubuntuhandbook.org/index.php/2022/04/ubuntu-22-04-remote-desktop-control/#:~:text=Enable%20Remote%20Desktop%20in%20Ubuntu%2022.04&text=Firstly%2C%20open%20system%20settings%20(Gnome,configure%20user%2C%20password%2C%20etc.

jp-blake commented 2 years ago

fwiw this is what worked for me on 20.04.4 with the latest chrome remote desktop:

--- chrome-remote-desktop.orig  2022-04-28 08:33:26.705924885 -0400
+++ chrome-remote-desktop   2022-04-28 09:11:58.476711664 -0400
@@ -108,7 +108,7 @@
 DEBIAN_XSESSION_PATH = "/etc/X11/Xsession"

 X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock"
-FIRST_X_DISPLAY_NUMBER = 20
+FIRST_X_DISPLAY_NUMBER = 0

 # Amount of time to wait between relaunching processes.
 SHORT_BACKOFF_TIME = 5
@@ -1026,8 +1026,8 @@
     """Return a candidate display number for which there is currently no
     X Server lock file"""
     display = FIRST_X_DISPLAY_NUMBER
-    while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
-      display += 1
+    # while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
+    #   display += 1
     return display

   def _init_child_env(self):
@@ -1173,10 +1173,10 @@
     if self.ssh_auth_sockname:
       self.child_env["SSH_AUTH_SOCK"] = self.ssh_auth_sockname

-    if USE_XORG_ENV_VAR in os.environ:
-      self._launch_xorg(display, x_auth_file, extra_x_args)
-    else:
-      self._launch_xvfb(display, x_auth_file, extra_x_args)
+    # if USE_XORG_ENV_VAR in os.environ:
+    #   self._launch_xorg(display, x_auth_file, extra_x_args)
+    # else:
+    #   self._launch_xvfb(display, x_auth_file, extra_x_args)

     # The remoting host expects the server to use "evdev" keycodes, but Xvfb
johnnynunez commented 2 years ago

And does it work with wayland? I get login looping but in theory the latest versions of chrome remote desktop are @jp-blake

johnnynunez commented 2 years ago

working in xorg ubuntu 22.04 but not with wayland(loop logging)

lemketron commented 2 years ago

The above changes matched my chrome-remote-desktop file better, but I cannot get it to start on my Ubuntu 22.04 system. I disabled wayland and stopped it from starting at boot but added it to my startup applications but it seems to crash on start as well as if I start it from the Remote Access web page ("Turn on") or even from the command line.

$ /opt/google/chrome-remote-desktop/chrome-remote-desktop --start
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

** (process:4122): WARNING **: 16:53:20.715: Error unregistering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.143 was not provided by any .service files

Any suggestions? My changes to the CDR script match those shown above.

CDR worked for me when I first installed it but I am not interested in a new session; I want to be able to access the desktop session. (I also disabled wayland and disabled AutomaticLoginEnable as well.)

johnnynunez commented 2 years ago

there has been an update to ubuntu or chrome desktop that has stopped working with these changes.

johnnynunez commented 1 year ago

@lemketron new changes

if self.use_xvfb:
  self._launch_xvfb(display, x_auth_file, extra_x_args)
else:
  self._launch_xorg(display, x_auth_file, extra_x_args)

comment these lines. Working on 22.04 and 23.04

jeremydthomas commented 1 year ago

Has anyone figured out a way to actually get this to work now? Im on linux Mint and no matter what I try I just keep getting a black screen. I dont mind having to stay logged out to log in with remote desktop, but it sure would be nice to be able to use it like you can in Windows.

lemketron commented 1 year ago

FWIW: I decided to install NoMachine instead, as it just works.

jeremydthomas commented 1 year ago

@lemketron are you using the paid version? I need web access and I see it's only available in the paid version.

evanferrao commented 1 year ago

@lemketron new changes

if self.use_xvfb:
  self._launch_xvfb(display, x_auth_file, extra_x_args)
else:
  self._launch_xorg(display, x_auth_file, extra_x_args)

comment these lines. Working on 22.04 and 23.04

I tried this, and doesn't work anymore. It initially shows the orange indicator showing that the remote is online, but doesn't connect. 10min later, it goes grey. I'm on latest debian 12. I tried gnome, xfce, cinnamon. CRD is currently using xfce. Wayland is disabled, all is on X11

lemketron commented 1 year ago

@lemketron are you using the paid version? I need web access and I see it's only available in the paid version.

I'm using the free version, but I am able to access my machine remotely using a private IP address over VPN.