Elektrine lite

← Feed

@brie@do.crimes.brie.gay

Post #1055342

2026-04-09 20:29 UTC

I was trying to figure out the "proper" way to set the ID of a flatpak. This did not go well, there seemed to be conflicting information, so I found the specs, which also did not help. (I will provide the full context in replies but it's going to be a lot, so the summary is going first) I might be missing something or not connecting part of it, this is somewhat new to me, but that's why I can provide sources! Here is the summary of what I have learned: 1. .desktop file names should be CamelCase (freedesktop desktop-entry spec) 2. dbus bus names should be CamelCase (freedesktop dbus spec) 3. flatpak ids should be all lower case (flatpak docs) 4. appstream IDs should be all lowercase (appstream spec) 5. dbus bus names, .desktop file names, flatpak app ids, and appstream IDs should should all be the same (freedesktop dbus spec, freedesktop desktop-entry spec, appstream spec, flatpak docs) On a casual read, one might think that these are obviously contradictory. I also think that.

Replies (1)

  • @brie@do.crimes.brie.gay 2026-04-09 20:31

    reading the spec about IDs for AppStream, which needs to match the flatpak ID:While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such as D-Bus (and thereby making the ID more generic and useful). Okay, sure. You shouldn't use hyphens because you can't use them in dbus/appstream ids, and all of this should match. Makes sense. One sentence later:Additionally, even though uppercase letters are permitted in a component-ID, it is strongly encouraged to only use lowercase letters for the ID.Sure, it is discouraged. Thank you for the info. All lower case. Let's just check out the other specs (for fun). starting with the freedesktop specifications for naming .desktop files:For applications, the part of the name of the desktop file before the .desktop extension should be a valid D-Bus well-known name.great. makes sense.The domain name should be followed by the name of the application, which is conventionally written with words run together and initial capital letters (CamelCase). For example, if the owner of example.org writes "Foo Viewer", they might choose the name org.example.FooViewer, resulting in a file named org.example.FooViewer.desktopThat seems like it's saying the exact opposite, but I'm probably missing something. Lets check out the spec for dbus names to make sure: We're looking for bus name ("the convention that an application's "main" interface and object path resemble its bus name"), so lets look at that section:Like interface names, well-known bus names should start with the reversed DNS domain name of the author of the interface (in lower-case), and it is conventional for the rest of the well-known bus name to consist of words run together, with initial capital letters.so according to various freedesktop specs: - AppStream ID, dbus bus names, and .desktop file names should match - dbus bus names and .desktop files should be camel case - AppStream ID should be all lowercase but that doesn't make sense because all of those things are freedesktop specs, which wouldn't contradict each other. right?

    Open ##1055354