启动 gnome 终端会导致“构建代理时出错...”

问题描述 投票:0回答:3

跑步

gnome-terminal
给了我

# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling
StartServiceByName for org.gnome.Terminal: Timeout was reached

localectl
的输出:

   System Locale: LANG=en_US.UTF-8
       VC Keymap: dvorak
      X11 Layout: dvorak
       X11 Model: pc105

导致此错误的原因可能是什么? here提到了它,但我没有通过 sudo 或 root 运行它...


运行

sudo gnome-terminal
工作正常,令人惊讶。

archlinux gnome-terminal
3个回答
5
投票

这在我安装

gnome-session
并运行
gnome-session
后起作用了。


1
投票

这个论坛帖子让我发现,你必须安装整个 gnome 才能工作

pacman -S gnome
(而不是尝试独立的
pacman -S gnome-terminal
或在我的情况下
pacman -S gnome-session
)。


另一种解决方案是使用

dbus-launch gnome-terminal
启动终端 - 取自 here


0
投票

使用

journalctl -f
启动时会显示以下警告
gnome-terminal

Nov 15 13:58:55 xxx systemd[1318]: xdg-desktop-portal.service: Failed with result 'timeout'.

可以安全地假设应用程序使用超时的 xdg-desktop-portal:

$ systemctl --user status xdg-desktop-portal
× xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: failed (Result: timeout) since Wed 2023-11-15 13:58:55 CET; 3min 7s ago
    Process: 892978 ExecStart=/usr/lib/xdg-desktop-portal (code=killed, signal=TERM)
   Main PID: 892978 (code=killed, signal=TERM)
        CPU: 19ms

Nov 15 13:57:25 xxx systemd[1318]: Starting Portal service...
Nov 15 13:58:15 xxx xdg-desktop-por[892978]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gnome: Timeout was reached
Nov 15 13:58:40 xxx xdg-desktop-por[892978]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gnome: Timeout was reached
Nov 15 13:58:40 xxx xdg-desktop-por[892978]: No skeleton to export
Nov 15 13:58:55 xxx systemd[1318]: xdg-desktop-portal.service: start operation timed out. Terminating.
Nov 15 13:58:55 xxx systemd[1318]: xdg-desktop-portal.service: Failed with result 'timeout'.
Nov 15 13:58:55 xxx systemd[1318]: Failed to start Portal service.

xdg-desktop-portal
似乎无法启动名为“org.freedesktop.impl.portal.desktop.gnome”的服务。有足够的灵感你就能找到它,但失败信息并没有说明太多:

$ pacman -Ss portal | grep gnome
extra/xdg-desktop-portal-gnome 45.0-1 (gnome) [installed]

$ systemctl --user status xdg-desktop-portal-gnome
○ xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gnome.service; static)
     Active: inactive (dead)
Nov 15 18:56:46 xxx systemd[1318]: Dependency failed for Portal service (GNOME implementation).
Nov 15 18:56:46 xxx systemd[1318]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.

搜索“为 org.freedesktop.impl.portal.desktop.gnome 调用 StartServiceByName 时出错:已达到超时”我发现https://github.com/flatpak/xdg-desktop-portal/issues/986其中有一些解决方法建议,选择适合您的东西:

  • dbus
    参考实现替换为
    dbus-broker
  • 卸载 xdg-desktop-portal-gnome
  • 通过屏蔽您的帐户禁用 xdg-desktop-portal-gnome:
    systemctl --user mask xdg-desktop-portal-gnome --now
© www.soinside.com 2019 - 2024. All rights reserved.