2

I have created a Flatpak app but I don't know how to specify icons and launcher information for my package.

The application has a desktop file but get this error message:

"Not exporting share/applications/myapp.desktop, wrong prefix"

The file is located in myapp/files/share/applications/myapp.desktop

Please help

YanetP1988
  • 1,346
  • 3
  • 18
  • 43
Johan Mattsson
  • 305
  • 6
  • 19

3 Answers3

3

The desktop file needs to be installed to:
/app/share/applications/<appid>.desktop

and the icon file to:
/app/share/icons/hicolor/<size>/apps/<appid>.<png|svg>

where your appid will be something like "com.example.myapp"

See http://docs.flatpak.org/en/latest/conventions.html

Note that the value for the "Exec" parameter in the desktop file should be the same as the "command" parameter in the flatpak manifest. The example given in the documentation is confusing because the name of the executable is the same as the appid, and if your executable is named differently you need to pick that instead. e.g. if your appid is "com.example.myapp" and your binary is just "myapp", you need "Exec=myapp" or even "Exec=/app/bin/myapp", not "Exec=com.example.myapp".

One last thing, if the desktop file appears to get installed, but nothing shows up in your program menu, it may be because your desktop environment needs you to log out and log back in again. See: https://ask.fedoraproject.org/en/question/128735/xfce-menu-doesnt-show-flatpak-apps/

aspragg
  • 31
  • 4
1

Desktop file and icons should be stored in myapp/export instead of myapp/files.

Johan Mattsson
  • 305
  • 6
  • 19
1

The desktop launchers seem to be located in: var/lib/flatpak/app//current/active/export/share/applications You should copy the launcher to the Desktop,right click, Allow Launching.