以 root 身份运行时必须指定 --user-name 选项 - Chrome 远程桌面

以 root 身份运行时必须指定 --user-name 选项 - Chrome 远程桌面

我已经在 Ubuntu 服务器 18.04 上安装了 Chrome 远程桌面和 Xfce,旨在通过远程桌面远程连接它。当我尝试执行连接命令时

DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="xxx" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)

我进入了Must specify the --user-name option when running as root控制台,但我真的不知道这意味着什么。是的,尽管出于安全原因,我还是尝试将其设置为 root,对我来说这样更容易。此外,系统安装在容器中,因此风险应该不大。我可以以 root 身份运行它吗?此消息是什么意思?

更新:嗯,结果比我想象的要简单得多。只需添加--user-name=robs23就足够了 :) 当然,用户名必须是系统中存在的真实用户的名称,因此我添加了它并使其成为 sudo 组 (27) 的成员。服务启动后立即失败,结果为exit-code。当我检查 chrome-remote-service 的状态时,我得到了:

Loaded: loaded (/lib/systemd/system/[email protected]; indirect; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2022-04-20 07:55:13 UTC; 16min ago
  Process: 24877 ExecStart=/opt/google/chrome-remote-desktop/chrome-remote-desktop --start --new-session
 Main PID: 24877 (code=exited, status=1/FAILURE)
Apr 20 07:55:12 PlexServer systemd[1]: Started Chrome Remote Desktop instance for robs23.
Apr 20 07:55:13 PlexServer systemd[1]: [email protected]: Main process exited, code=exi
Apr 20 07:55:13 PlexServer systemd[1]: [email protected]: Failed with result 'exit-code'

服务器出现在https://remotedesktop.google.com/access但描述说,它全是灰色的远程桌面正在启动,请稍后检查。可能出了什么问题?

相关内容