Syntax checking for .desktop files

I can install a graphical software application like the following for a test case.

Sonne:~ # zypper in -f -y xterm
…
Additional rpm output:
syntax error in /usr/share/applications/….desktop, line 1
…

The package is fine by itself. But I would like to know which program (or function) does not like the mentioned file (from an other software).
Can I execute a similar command also directly for another syntax check?

Hi
Don’t see the error here;


zypper in -f -y xterm

Loading repository data...
Reading installed packages...
Forcing installation of 'xterm-327-2.4.x86_64' from repository 'Main Repository (OSS)'.
Resolving package dependencies...

The following package is going to be reinstalled:
  xterm

1 package to reinstall.
Overall download size: 122.4 KiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/...? shows all options] (y): y
Retrieving package xterm-327-2.4.x86_64                                                                                           (1/1), 122.4 KiB ( 38.0 KiB unpacked)
Retrieving: xterm-327-2.4.x86_64.rpm ................................................................................................................[done (2.5 KiB/s)]
Checking for file conflicts: ....................................................................................................................................[done]
(1/1) Installing: xterm-327-2.4.x86_64 ..........................................................................................................................[done]
Running: xterm-327-2.4-reconfigure-fonts  (xterm, /var/adm/update-scripts)
Running: xterm-327-2.4-reconfigure-fonts  (xterm, /var/adm/update-scripts) ......................................................................................[done]

The desktop file shows one warning…


 desktop-file-validate /usr/share/applications/xterm.desktop

/usr/share/applications/xterm.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated

No manual edits of a desktop file?

It seems that you interpreted my clarification request in an unwanted direction.

A function from the command like “zypper in -f -y xterm” triggers the checking of .desktop files not only for this test package but also from an other software.
Which tool is called for such a purpose at the end of this installation process?

Hi
These are %post(un) sections in the rpm spec file which can run scripts, add users, run rpm macros, anything you want in fact if you script it…

So you need to be more specific, what rpm is this, one you made, or exist on OBS?

It could be some fallout from the dropping of the desktop macros from factory, so real details are needed…

Please show the real error, as in name of the desktop file that shows the syntax error.

How often should an error message be displayed there if an inappropriate file is found during the installation of an example desktop file?

Please show the real error, as in name of the desktop file that shows the syntax error.

A questionable version of the file “/usr/share/applications/kyodialog3.desktop” was installed on my system a while ago.

Your feedback was useful in the way that I could improve it a bit for my needs with information from the tool “desktop-file-validate”. Would you like to achieve any more improvements in this software area?

Hi
Hmm, is that something to do with kyocera printer?

Can you post the output of;


cat /usr/share/applications/kyodialog3.desktop

The desktop file standards and macros are here for openSUSE;
https://en.opensuse.org/openSUSE:Packaging_desktop_menu_categories
https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25suse_update_desktop_file

Yes. - I became also curious on how this vendor will improve the provided software. I adjusted the corresponding desktop file a bit a moment ago.