Answers:
您正在寻找发行版中desktop-files-utils软件包desktop-file-validate
提供的工具。总而言之,它使用保留字/字符检查语法是否符合Desktop Entry规范。这是一个错误的.desktop文件的示例:
➜ ~ desktop-file-validate asdf.desktop
asdf.desktop: error: value "cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*" for key "Exec" in group "Desktop Entry" contains a reserved character '&' outside of a quote
asdf.desktop: error: value "cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*" for key "Exec" in group "Desktop Entry" contains a reserved character '&' outside of a quote
asdf.desktop: error: value "cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*" for key "Exec" in group "Desktop Entry" contains a reserved character '$' outside of a quote
asdf.desktop: error: value "cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*" for key "Exec" in group "Desktop Entry" contains a reserved character '*' outside of a quote
asdf.desktop: hint: value item "GNOME" in key "Categories" in group "Desktop Entry" can be extended with another category among the following categories: GTK
asdf.desktop: error: value "GNOME;Oracle;Utility;Development;" for key "Categories" in group "Desktop Entry" contains an unregistered value "Oracle"; values extending the format should start with "X-"
asdf.desktop: hint: value "GNOME;Oracle;Utility;Development;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
asdf.desktop: error: value "s.0.m.t.h.i.n.g" for key "Version" in group "Desktop Entry" is not a known version
诸如此类的好文件caribou-autostart.desktop
不会显示任何内容。
desktop-file-validate
可能没有显示任何错误,但由于在上的无效输入,因此可能仍然根本不起作用Exec
。