thunar-archive-plugin - 无法提取文件:找不到合适的存档管理器

Had*_*lle 4 archive centos thunar

由于我们在 Centos 7.4 上卸载了 ark 归档器以使用 file-roller,因此我们在 thunar 上使用 thunar-archive-plugin 遇到了错误。
任何操作(在此处提取、提取到、创建存档)都会给出以下错误消息:

Failed to extract files: No suitable archive manager found
Run Code Online (Sandbox Code Playgroud)

Had*_*lle 9

thunar-archive-plugin 的工作方式如下。

如果你想在 thunar 中右键单击来提取文件 test.tar.gz。在后台工作的过程如下:

它确定文件的 MIME 类型。你可以这样做:

# xdg-mime query filetype /path/to/test.targ.gz
# application/x-gzip
Run Code Online (Sandbox Code Playgroud)

它确定此 MIME 类型的默认应用程序。你可以这样做:

# xdg-mime query default application/x-gzip
# org.gnome.FileRoller.desktop
Run Code Online (Sandbox Code Playgroud)

它尝试找到与此应用程序名称匹配的 thunar-achive-plugin。在 Centos 7 上,这些插件(.tap 文件)存储在:/usr/libexec/thunar-archive-plugin/。

Thunar-archive-plugin 将尝试根据默认应用程序桌面文件名查找 .tap 文件。对于我的示例,默认应用程序是org.gnome.FileRoller .desktop,然后它会搜索名为:/usr/libexec/thunar-archive-plugin/org.gnome.FileRoller .tap的 tap 文件

这就是问题所在。文件滚轮 .tap 插件文件被命名为file-roller .tap 而不是org.gnome.FileRoller .tap

为了解决这个问题,我只是做了:

# ln -s /usr/libexec/thunar-archive-plugin/file-roller.tap /usr/libexec/thunar-archive-plugin/org.gnome.FileRoller.tap
Run Code Online (Sandbox Code Playgroud)

知道 .app 文件只是您可以修改的 bash 脚本很有用。如果您的存档器不受支持,您也可以为存档器创建一个。