You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 20.04 LTS安装Chrome Remote Desktop后设备无法在网页显示

解决Ubuntu 20.04 LTS上Chrome Remote Desktop无法显示的xdg模块问题

问题背景

在Ubuntu 20.04 LTS系统通过SSH完成Chrome Remote Desktop安装后,设备无法在远程桌面访问页面中显示。手动执行启动命令时触发明确的模块错误,系统日志显示服务启动失败(退出码1)。

关键错误信息

手动执行命令 /opt/google/chrome-remote-desktop/chrome-remote-desktop --start --new-session 时,返回以下错误:

2023-08-01 16:45:08,461: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.
2023-08-01 16:45:08,462:INFO:Using host_id: ***********
2023-08-01 16:45:08,476:INFO:xserver-xorg-video-dummy is not up-to-date
Traceback (most recent call last):
  File "/opt/google/chrome-remote-desktop/chrome-remote-desktop", line 2600, in <module>
    sys.exit(main())
  File "/opt/google/chrome-remote-desktop/chrome-remote-desktop", line 2576, in main
    desktop.setup_audio(host.host_id, backoff_time)
  File "/opt/google/chrome-remote-desktop/chrome-remote-desktop", line 1013, in setup_audio
    xdg.BaseDirectory.get_runtime_dir(strict=False), runtime_dirname)
AttributeError: module 'xdg' has no attribute 'BaseDirectory'
2023-08-01 16:45:08,525:INFO:Cleanup.

解决方案

错误根源是Ubuntu 20.04默认的python3-xdg包版本过低,Chrome Remote Desktop期望调用的xdg.BaseDirectory在旧版本中不存在。执行以下步骤修复:

  1. 卸载系统自带的低版本xdg包
sudo apt remove --purge python3-xdg
  1. 通过pip安装最新版的pyxdg
sudo pip3 install pyxdg
  1. 重启Chrome Remote Desktop服务
sudo systemctl restart chrome-remote-desktop@$USER.service
  1. 验证服务运行状态
systemctl status chrome-remote-desktop@$USER.service

补充排查项

如果问题仍存在,可检查:

  • 更新虚拟显示驱动:
sudo apt install --upgrade xserver-xorg-video-dummy
  • 确认GDM服务状态(若使用GDM桌面),避免本地登录冲突:
systemctl status gdm

内容的提问来源于stack exchange,提问作者Xavier12358

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 13:44:53