我正在对已知的“Firefox 无法打开文件对话框”错误进行故障排除,每次尝试时 Firefox 都会打印此消息:
Gtk-WARNING **: 22:45:36.767: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.FileChooser” on object at path /org/freedesktop/portal/desktop
我已经检查过和都已xdg-desktop-portal
安装xdg-desktop-portal-gtk
并正在运行:
$ systemctl --user status xdg-desktop-portal-gtk
● xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
Active: active (running) since Sat 2022-07-16 14:35:00 CEST; 8h ago
Main PID: 258458 (xdg-desktop-por)
Tasks: 4 (limit: 18837)
Memory: 3.3M
CPU: 1.207s
CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/xdg-desktop-portal-gtk.service
└─258458 /usr/libexec/xdg-desktop-portal-gtk
lip 16 14:34:59 carbon systemd[1873]: Starting Portal service (GTK/GNOME implementation)...
lip 16 14:35:00 carbon systemd[1873]: Started Portal service (GTK/GNOME implementation).
$ systemctl --user status xdg-desktop-portal
● xdg-desktop-portal.service - Portal service
Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
Active: active (running) since Sat 2022-07-16 14:13:36 CEST; 8h ago
Main PID: 229072 (xdg-desktop-por)
Tasks: 5 (limit: 18837)
Memory: 4.7M
CPU: 1.419s
CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service
└─229072 /usr/libexec/xdg-desktop-portal
lip 16 14:13:36 carbon systemd[1873]: Starting Portal service...
lip 16 14:13:36 carbon xdg-desktop-por[229072]: No skeleton to export
lip 16 14:13:36 carbon systemd[1873]: Started Portal service.
我的 Ubuntu 版本:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
我的问题是:我接下来该去哪里?
答案1
问题出在/usr/share/xdg-desktop-portal/portals/gtk.portal
会话使用 i3wm 上。将该文件中的 更改UseIn=gnome
为UseIn=gnome;i3
即可解决问题。
一般来说,$XDG_CURRENT_DESKTOP
必须在UseIn=
文件的节中。在我的例子中是i3
。