~scoopta/wofi#230: 
Desktop files with multiple groups parsed incorrectly

The following kind of desktop entry fails to parse correctly:

[Desktop Entry]
Type=Application
Name=Scribus
TryExec=scribus
Exec=scribus %f
[X-Property::X-KDE-NativeExtension]
Type=QString
Value=.sla

with the error message:

err: Value of key 'Type' must be Application, Link or Directory, but is 'QString'
err: Invalid key: Value

Wofi is apparently falling through to the X-Property group, still trying to parse the keys. Maybe, it should restrict itself to the "Desktop Entry" group?

Status
REPORTED
Submitter
~spacefrogg
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~scoopta a month ago

What distro are you on, what version of that distro, and what version of GLib is installed? Wofi doesn't parse desktop files but rather uses GIO from GLib to do so. On my system I have libglib 2.82.2 and I cannot reproduce this issue.

~spacefrogg a month ago

Wofi etc. is coming from nixpkgs 24.11 which is using libglib 2.82.1. The basic operating system is a Ubuntu 24.05. The offending desktop entry from Scribus is likewise coming from nixpkgs and I shortened it as it contained a lot of localization. Maybe I've changed the outcome by doing that.

~scoopta a month ago

Hmmm, I'll do some more investigation as I doubt the change from glib 2.82.1 to 2.82.2 is to blame? Maybe, I didn't try to install the offending package, I just hand crafted a desktop file using the one you provided as a basis and it didn't happen. Unfortunately nix is black magic to me so I'm not sure I can deploy on nix but maybe I can figure out what's happening all the same

~spacefrogg a month ago

This is the offending .desktop file:

[Desktop Entry]
Type=Application
Name=Scribus
Name[ar]=سكريبس
Name[fa]=اسکریباس
Name[lo]=ສະຄຣີບັດສ໌
Name[ru]=Scribus
Name[ta]=ஸ்கிரிபஸ்
Comment=Page Layout and Publication
Comment[ar]=سكريبس
Comment[fa]=اسکریباس
Comment[ta]=ஸ்கிரிபஸ்
Comment[af]=Werkskerm Publisering
Comment[bg]=Издателска програма
Comment[bs]=Stono izdavaštvo (DTP)
Comment[ca]=Publicació d'escriptori
Comment[cs]=Publikační systém (DTP)
Comment[cy]=Cyhoeddi Penbwrdd
Comment[da]=Dtp
Comment[de]=Desktop-Publishing
Comment[eo]=DTP-programo
Comment[es]=Publicación de escritorio
Comment[et]=Küljendusrakendus
Comment[fi]=Julkaisuohjelma
Comment[fr]=Publication assistée par ordinateur (PAO)
Comment[he]=הוצאה לאור שולחנית
Comment[hr]=Stolno izdavaštvo
Comment[hu]=Kiadványszerkesztés
Comment[it]=Pubblicazioni
Comment[ja]=デスクトップパブリッシング
Comment[lo]=ເດດທອບພັລບບີດຊິງ
Comment[lt]=Darbastalio leidykla
Comment[nb]=Datatrykkeprogram
Comment[nn]=Datatrykk
Comment[nso]=Kwalakwatso ya Desktop
Comment[pl]=Program do składu tekstu
Comment[pt]=Publicação no Ecrã
Comment[pt_BR]=Publicação do Ambiente de Trabalho
Comment[ru]=Настольное издательство
Comment[sl]=Namizno založništvo
Comment[sr]=Стоно издаваштво
Comment[ss]=Kushicelela ku desktop
Comment[sv]=Desktop Publishing
Comment[th]=เดสก์ทอปพับลิชชิง
Comment[tr]=Masaüstü Yayıncılık
Comment[uk]=Видавнича система
Comment[uz]=Кичик нашриёт
Comment[ven]=U andadza Desikithopo
Comment[xh]=Upapasho lwe Desktop
Comment[zh_CN]=桌面出版
Comment[zh_TW]=桌面出版
Comment[zu]=Ukushicilelwa kwe-Desktop
GenericName=Page Layout (Development)
GenericName[af]=Werkskerm Publisering
GenericName[bg]=Издателска програма
GenericName[bs]=Stono izdavaštvo (DTP)
GenericName[ca]=Publicació d'escriptori
GenericName[cs]=Publikační systém (DTP)
GenericName[cy]=Cyhoeddi Penbwrdd
GenericName[da]=Dtp
GenericName[de]=Desktop-Publishing
GenericName[eo]=DTP-programo
GenericName[es]=Publicación de escritorio
GenericName[et]=Küljendusrakendus
GenericName[fa]=نشر میزکار
GenericName[fi]=Julkaisuohjelma
GenericName[fr]=Publication assistée par ordinateur (PAO)
GenericName[he]=הוצאה לאור שולחנית
GenericName[hr]=Stolno izdavaštvo
GenericName[hu]=Kiadványszerkesztés
GenericName[it]=Pubblicazioni
GenericName[ja]=デスクトップパブリッシング
GenericName[lo]=ເດດທອບພັລບບີດຊິງ
GenericName[lt]=Darbastalio leidykla
GenericName[nb]=Datatrykkeprogram
GenericName[nn]=Datatrykk
GenericName[nso]=Kwalakwatso ya Desktop
GenericName[pl]=Program do składu tekstu
GenericName[pt]=Edição Electrónica
GenericName[pt_BR]=Editoração eletrônica
GenericName[ru]=Настольная издательская система
GenericName[sl]=Namizno založništvo
GenericName[sr]=Стоно издаваштво
GenericName[ss]=Kushicelela ku desktop
GenericName[sv]=Desktop Publishing
GenericName[th]=เดสก์ทอปพับลิชชิง
GenericName[tr]=Masaüstü Yayıncılık
GenericName[tt]=Өстәл нәшрияты
GenericName[uk]=Видавнича система
GenericName[uz]=Кичик нашриёт
GenericName[ven]=U andadza Desikithopo
GenericName[xh]=Upapasho lwe Desktop
GenericName[zh_CN]=桌面出版
GenericName[zh_TW]=桌面出版
GenericName[zu]=Ukushicilelwa kwe-Desktop
TryExec=scribus
Exec=scribus %f
Icon=scribus
Terminal=false
MimeType=application/vnd.scribus;
Categories=Qt;Graphics;Publishing;
StartupWMClass=scribus
DocPath=scribus
StartupNotify=false
X-AppInstall-Package=scribus
X-AppInstall-Section=main
X-KDE-SubstituteUID=false
X-KDE-Username=
[X-Property::X-KDE-NativeExtension]
Type=QString
Value=.sla
Register here or Log in to comment, or comment via email.