syntax error in /usr/share/applications/SACMonitor.desktop, line 1

I thought this error would go away with leap upgrade 15.2 > 15.3 and reinstall of pcsc and SafenetAuthenticationClient but it hasn’t.

Whenever I update or install something completely unrelated such as neovim, I get errors:

Additional rpm output:
syntax error in /usr/share/applications/SACMonitor.desktop, line 1
syntax error in /usr/share/applications/SACTools.desktop, line 1
syntax error in /usr/share/applications/SACMonitor.desktop, line 1
syntax error in /usr/share/applications/SACTools.desktop, line 1
syntax error in /usr/share/applications/SACMonitor.desktop, line 1
syntax error in /usr/share/applications/SACTools.desktop, line 1

I tried replacing line 1 and 2 and looking into files but it doesn’t make error go away.

The files are:

cat /usr/share/applications/SACMonitor.desktop
[Desktop Entry]
Encoding=UTF-8
Name=SafeNet Authentication Client
GenericName=SACMonitor
Exec=/usr/bin/SACMonitor
Icon=SACMonitor
Type=Application
DocPath=SACMonitor/index.html
Terminal=false
X-GNOME-Autostart-enabled=true
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-DCOP-ServiceType=Unique
X-KDE-UniqueApplet=true
X-KDE-autostart-condition=AutoStart:true
Categories=SafeNet-Authentication-Client
Comment=SafeNet Authentication Client

and

cat /usr/share/applications/SACTools.desktop
[Desktop Entry]
Encoding=UTF-8
Name=SafeNet Authentication Client Tools
GenericName=SAC Tools
Exec=/usr/bin/SACTools
Icon=SACTools
Type=Application
DocPath=SACTools/index.html
Terminal=false
X-GNOME-Autostart-enabled=false
X-KDE-StartupNotify=false
X-DCOP-ServiceType=Unique
X-KDE-UniqueApplet=true
X-KDE-autostart-condition=AutoStart:false
Categories=SafeNet-Authentication-Client
Comment=SafeNet Authentication Client Tools

What would case the error?

The files are symlinks:
lrwxrwxrwx 1 root root 46 Jul 18 14:20 SACMonitor.desktop -> /usr/share/eToken/shortcuts/SACMonitor.desktop
lrwxrwxrwx 1 root root 44 Jul 18 14:20 SACTools.desktop -> /usr/share/eToken/shortcuts/SACTools.desktop

Even when I copy file the error is still here. Problem is cosmetic but interesting.

Hi
The desktop files may have been created on a different platform, run desktop-file-validate on them, another option is to run dos2unix on them and see if that helps.

dos2unix worked, thank you

Hi
I suspect some invisible ^M’s at the end of the line :wink: