Results 1 to 7 of 7

Thread: Syntax checking for .desktop files

  1. #1

    Question Syntax checking for .desktop files

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

    Code:
    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?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,127
    Blog Entries
    15

    Default Re: Syntax checking for .desktop files

    Hi
    Don't see the error here;
    Code:
    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...
    Code:
     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?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Question Re: Syntax checking for .desktop files

    Quote Originally Posted by malcolmlewis View Post
    Don't see the error here;
    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?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,127
    Blog Entries
    15

    Default Re: Syntax checking for .desktop files

    Quote Originally Posted by elfring View Post
    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.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Question Re: Syntax checking for .desktop files

    Quote Originally Posted by malcolmlewis View Post
    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....
    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?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,127
    Blog Entries
    15

    Default Re: Syntax checking for .desktop files

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

    Can you post the output of;
    Code:
    cat /usr/share/applications/kyodialog3.desktop
    The desktop file standards and macros are here for openSUSE;
    https://en.opensuse.org/openSUSE:Pac...enu_categories
    https://en.opensuse.org/openSUSE:Pac...e_desktop_file
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7

    Lightbulb Re: Syntax checking for .desktop files

    Quote Originally Posted by malcolmlewis View Post
    Hmm, is that something to do with kyocera printer?
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •