我的系统

我的系统

我的系统

Archlinux 带有 KDE,所有升级已完成。我已安装 libreoffice。

问题

每次我从终端打开文件(例如:)时,open-xdg mypdf.pdf我都会收到一堆警告(见下文)。我知道这只是警告,所以这不是真正的问题,但每次在终端中看到这些都很烦人……

您知道如何纠正它吗?我不确定它是否基于 KDE,但谁知道呢

到目前为止我尝试过的

当我进入/usr/share/mime/subclasses并删除下面给出的所有行(手动)时,它就会消失......直到下一次升级。

看完答案后

它仍然不起作用。我做了以下事情

$ xdg-mime default libreoffice-impress.desktop application/vnd.ms-powerpoint.slideshow.macroEnabled.12
$ xdg-mime default libreoffice-impress.desktop application/vnd.ms-powerpoint.slide.macroEnabled.12

$ grep -i libre ~/.local/share/applications/*给出:

/home/olivier/.local/share/applications/mimeapps.list:application/vnd.ms-powerpoint.slideshow.macroEnabled.12=libreoffice-impress.desktop;
/home/olivier/.local/share/applications/mimeapps.list:application/vnd.ms-powerpoint.slide.macroEnabled.12=libreoffice-impress.desktop
/home/olivier/.local/share/applications/mimeapps.list:application/vnd.ms-powerpoint.slideshow.macroEnabled.12=libreoffice-impress.desktop
/home/olivier/.local/share/applications/mimeapps.list:application/vnd.ms-powerpoint.slide.macroEnabled.12=libreoffice-impress.desktop

症状

$ kde-open mypdf.pdf 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.binary.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.addin.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.presentation.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.template.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.template.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.template.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.document.macroEnabled.12" 
kioclient(6749) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slide.macroEnabled.12" 

谢谢你的帮助

答案1

这是 KDE 中的一个已知错误:https://bugs.kde.org/show_bug.cgi?id=343468那里的评论建议只需手动替换有故障的字符串,直到上游修复该错误。

答案2

您可以从中删除这些未知的行/usr/share/mime/subclasses

sudo cp /usr/share/mime/subclasses /usr/share/mime/subclasses.bak
sudo vim /usr/share/mime/subclasses
# remove all lines containing unknown mime types e.g. application/vnd.ms-excel

diff 的结果

diff /usr/share/mime/subclasses.bak /usr/share/mime/subclasses

应该是

答案3

可能需要更新桌面数据库和 mime 数据库。请在终端中尝试以下命令:

$ update-desktop-database ~/.local/share/applications $ update-mime-database ~/.local/share/mime

更多信息请参见关联。

答案4

必须手动修复 mime 类型,这是实际的问题:

cp /usr/share/mime/subclasses /usr/share/mime/subclasses.bak
sed -i 's:macroEnabled:macroenabled:g' /usr/share/mime/subclasses
cat /usr/share/mime/subclasses

相关内容