~/.config/chrome-remote-desktop未找到

~/.config/chrome-remote-desktop未找到

我正在尝试使用 Chrome 远程桌面从 Mac 访问我的机器。当我尝试“启用远程连接”步骤时,它会尝试一段时间,然后超时并显示错误“无法启动远程访问服务”。如果我关闭窗口,我的机器就会显示“(上次在线时间下午 3:49:58)”,其中的时间是我尝试启动服务的时间。

我尝试重新安装 chrome 和 chrome 远程桌面,并按照这个问题。我可以通过“远程协助”连接到我的电脑,并且我可以从我的 Linux 机器连接到我的 Mac。还有其他想法吗?

答案1

~/.config/chrome-remote-desktop未找到

我遇到了一个非常具体的问题,~/.config/chrome-remote-desktop没有被找到,并且修复了它:

mkdir -p ~/.config/chrome-remote-desktop
chown "$USER:$USER" ~/.config/chrome-remote-desktop
chmod a+rx ~/.config/chrome-remote-desktop

然后

  1. 我卸载了 Chrome-Remote-Desktop 扩展程序
  2. 我确保在浏览器的个人资料和 google.com 上都登录了我的 Google 帐户
  3. 我运行dpkg --purge chrome-remote-desktop删除了以前的安装。(编辑为--purge)
  4. 我按 Ctrl+F5https://remotedesktop.google.com在尝试重新安装之前

(使用 Ctrl+Alt+T 打开终端,然后将上述命令粘贴到终端中。如果遇到错误,请在每个出错的命令(文本行)前面加上 sudo)

如何对问题进行自己的评估

我的问题的解决方案可能并不适合您,因此让我向您展示我如何找到解决方案,以便您可以找到自己的解决方案。首先,我们需要获取状态日志:

username@hostname:~$ service "chrome-remote-desktop@$USER" status
● chrome-remote-desktop.service - LSB: Chrome Remote Desktop service
     Loaded: loaded (/etc/init.d/chrome-remote-desktop; generated)
     Active: active (exited) since Fri 2020-07-24 17:11:25 EDT; 22s ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 0 (limit: 28767)
     Memory: 0B
     CGroup: /system.slice/chrome-remote-desktop.service

Jul 24 17:11:25 hostname systemd[1]: Starting LSB: Chrome Remote Desktop service...
Jul 24 17:11:25 hostname systemd[1]: Started LSB: Chrome Remote Desktop service.

为了让它开始记录,我必须执行以下操作:

username@hostname:~$ usermod -a -G chrome-remote-desktop "$USER"
username@hostname:~$ sudo service "chrome-remote-desktop@$USER" restart
username@hostname:~$ service "chrome-remote-desktop@$USER" status
● chrome-remote-desktop.service - LSB: Chrome Remote Desktop service
 Loaded: loaded (/etc/init.d/chrome-remote-desktop; generated)
 Active: active (exited) since Fri 2020-07-24 17:12:16 EDT; 13s ago
   Docs: man:systemd-sysv-generator(8)
Process: 125177 ExecStart=/etc/init.d/chrome-remote-desktop start (code=exited, status=0/SUCCESS)
Jul 24 17:12:16 hostname sudo[125187]: pam_unix(sudo:session): session opened for user username by (uid=0)
Jul 24 17:12:16 hostname chrome-remote-desktop[125197]: [0724/171216.183432:INFO:remoting_user_session.cc(738)] Daemon process started in the background, logging to '/tmp/chrome_remote_desktop_20200724_>
Jul 24 17:12:16 hostname user-session[125198]: pam_unix(chrome-remote-desktop:session): session opened for user username by (uid=1000)
Jul 24 17:12:16 hostname chrome-remote-desktop[125195]: WARNING: This system uses GDM. Some GDM versions have a bug that prevents local login while Chrome Remote Desktop is running. If you run into this>
Jul 24 17:12:16 hostname chrome-remote-desktop[125195]: Cleanup.
Jul 24 17:12:16 hostname chrome-remote-desktop[125195]: Log file: /tmp/chrome_remote_desktop_20200724_171216_b4R1oT
Jul 24 17:12:16 hostname user-session[125198]: pam_unix(chrome-remote-desktop:session): session closed for user username
Jul 24 17:12:16 hostname sudo[125187]: pam_unix(sudo:session): session closed for user username
Jul 24 17:12:16 hostname chrome-remote-desktop[125177]:    ...fail!
Jul 24 17:12:16 hostname systemd[1]: Started LSB: Chrome Remote Desktop service.

现在,让我们看看该日志文件的内容:

username@hostname:~$ cat /tmp/chrome_remote_desktop_20200724_171216_b4R1oT
2020-07-24 17:15:10,835:WARNING:WARNING: This system uses GDM. Some GDM versions have a bug that prevents local login while Chrome Remote Desktop is running. If you run into this issue, you can stop Chrome Remote Desktop by visiting https://remotedesktop.google.com/access on another machine and clicking the delete icon next to this machine. It may take up to five minutes for the Chrome Remote Desktop to exit on this machine and for local login to start working again.
Failed to load config: [Errno 2] No such file or directory: '/home/username/.config/chrome-remote-desktop/host#98a9a95d871bdecaeb1ebddc57c9cdfe.json'
2020-07-24 17:15:10,836:INFO:Cleanup.

它说“没有这样的文件或目录”,所以我按照顶部步骤所述创建了该目录,从而解决了该问题。

答案2

我想我明白了发生了什么。首先,我删除了我的 chrome 远程桌面安装和与 google chrome 相关的所有配置文件。然后我重新安装,并按照以下修改操作这里这样我就可以远程进入当前会话。它工作了大约 24 小时,之后就无法连接了。

所以我再次删除了所有内容,并重新安装,但没有配置它以连接到当前会话。现在它工作正常。简而言之,您以前可以编辑代码以连接到当前会话,但最近更新后这会导致错误。

答案3

Chromium 浏览器和 Chrome 可能是不同的浏览器。可能是 Google 无法向 Chromium 提供一些令牌。由于这个原因,您可以按照以下步骤在 ubuntu 上使用 chrome-remote-desktop。安装完成后,您的计算机上有两个 chrome 应用程序可用。真正的应用程序是红绿黄色的。

它已经在我的 Ubuntu 18.04.1 LTS 桌面上试用并运行。

就这些,尽情享受吧。

相关内容