如何修复 Foliate 3 在最近更新后无法打开任何书籍的问题?

如何修复 Foliate 3 在最近更新后无法打开任何书籍的问题?

最近更新后,Foliate 电子书阅读器无法再打开电子书(APT 和 Snap 版本均如此)。

该问题似乎发生在带有 snap 的 Ubuntu 22.04 中,以及 Ubuntu 24.04 中。

$ foliate Alcott, Louisa May - Little Women.epub

(com.github.johnfactotum.Foliate:2289): Gtk-WARNING **: 01:51:13.769: Unknown key gtk-modules in /home/archisman/.config/gtk-4.0/settings.ini
bwrap: setting up uid map: Permission denied

** (com.github.johnfactotum.Foliate:2289): ERROR **: 01:51:14.283: Failed to fully launch dbus-proxy: Child process exited with code 1
Trace/breakpoint trap

如何解决这个问题?

答案1

作为一种解决方法,请创建包含以下内容的文件/etc/apparmor.d/foliate(例如)。sudo nano /etc/apparmor.d/foliate

# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

abi <abi/4.0>,
include <tunables/global>

profile foliate /usr/bin/foliate flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/foliate>
}

接下来,重新启动 apparmor.service。

sudo systemctl restart apparmor
sudo systemctl restart apparmor.service

现在 Foliate 应该可以正常运行了。

相关内容