Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <launchable/> into the .appdata.xml file #269

Closed
mcrha opened this issue Apr 26, 2022 · 4 comments
Closed

Add <launchable/> into the .appdata.xml file #269

mcrha opened this issue Apr 26, 2022 · 4 comments

Comments

@mcrha
Copy link

mcrha commented Apr 26, 2022

/usr/share/applications/system-config-printer.desktop

corresponds to

/usr/share/metainfo/system-config-printer.appdata.xml

, which has

<id>org.fedoraproject.systemconfigprinter</id>
and
<provides><id>system-config-printer.desktop</id></provides>.

The .desktop file and the .appdata.xml file are not matched by GNOME Software, thus the application doesn't show correct (printer) icon in the Installed page.

To have it properly working, add

<launchable type="desktop-id">system-config-printer.desktop</launchable>

into the .appdata.xml file.

The related documentation is here (important part is the note about merging data):
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-dapp-launchable

This had been discussed in the GNOME Software here:
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1322#note_1437223

Note this is not only about GNOME Software, any appstream consuming application can be affected.

@zdohnal
Copy link
Member

zdohnal commented Jun 10, 2022

Hi @mcrha ,

I'm sorry for delay - I've applied the change into branch gnome-sw-problems, because there seem to be more issues with s-c-p in gnome-software (#273). Is it connected to the missing launchable tag as well?

Do you know how to verify whether the fix works? I've tried gnome-software --verbose --prefer-local when I had the fixed s-c-p installed, but no icon was shown.

@mcrha
Copy link
Author

mcrha commented Jun 10, 2022

My test was to edit /usr/share/metainfo/system-config-printer.appdata.xml directly and add there the <launchable> line. Then restart gnome-software (gnome-software --quit; gnome-software --mode=installed) and search for the Print Settings in the Installed tab, where it should show the icon now. It works properly here.

@zdohnal
Copy link
Member

zdohnal commented Jun 13, 2022

@mcrha arggh... bad Friday, I was adding to the bad file... but still I don't see the icon:

/usr/share/metainfo/system-config-printer.appdata.xml:
...
 81   </provides>
 82   <launchable type="desktop-id">system-config-printer.desktop</launchable>
 83   <update_contact>zdohnal@redhat.com</update_contact>
 84 </component>
$ gnome-software --quit && gnome-software --mode=installed

Clicking on magnifying glass and look for Print Settings returns irrelevant entries
screenshot
, and checking the Installed list shows the Print Settings without an icon
screenshot

Do you know what is wrong or how to debug? I use Fedora 35 and gnome-software-41.5-1.fc35

@mcrha
Copy link
Author

mcrha commented Jun 13, 2022

I'm afraid the 41.5.fc35 is dull, doesn't contain certain fix (which I do not have a link to), because I can reproduce what you see with it, but when I try the same changes in Fedora 36 with gnome-software 42.1, then it shows the icon after adding the<launchable> exactly the same way as you showed in the previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants