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

Filenames case(s) conventions #547

Open
ederag opened this issue Feb 11, 2020 · 2 comments
Open

Filenames case(s) conventions #547

ederag opened this issue Feb 11, 2020 · 2 comments

Comments

@ederag
Copy link
Collaborator

ederag commented Feb 11, 2020

Follow-up to the discussion about cases.

desktop file specification:

it should start with
a reversed DNS domain name controlled by the author of the application, in lower case.
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.desktop.

flatpak conventions:

As described in Using Flatpak,
Flatpak requires each application to have a unique identifier,
which has a form such as org.gnome.Dictionary

That bit follows the freedesktop specification, right,
but this example is at odd with the gnome recommendations

the desktop file should be lower-case

But in gnome Rules for application IDs,

each element must contain one or more of the alphanumeric characters (A-Z, a-z, 0-9) plus underscore ('_') and hyphen ('-') and must not start with a digit

Looks things are evolving from all lower case to the freedesktop specs.

Last source of confusion:

In the gnome wiki:

Note: it's recommended that you use the same identifier for your application id, .desktop file, .service file, and application icon. This allows the Shell to match all your assets to the application, and prepares your application for sandboxing.

But in Freedesktop icon specification:

all icon names may only contain lowercase letters, numbers, underscore, dash, or period

but maybe that does not concern the application icon itself ?

From https://developer.gnome.org/gtk4/stable/gtk-migrating-3-to-4.html#id-1.6.4.3.13:

In GTK 4 we want the application's GApplication 'application-id' (and therefore the D-Bus name), the desktop file basename and Wayland's xdg-shell app_id to match. In order to achieve this with GTK 3.x call g_set_prgname() with the same application ID you passed to GtkApplication. Rename your desktop files to match the application ID if needed.
The call to g_set_prgname() can be removed once you fully migrated to GTK 4.
You should be aware that changing the application ID makes your application appear as a new, different app to application installers. You should consult the appstream documentation for best practices around renaming applications.

TL;DR: it's clearly evolving, probably towards the freedesktop specification for .desktop names + everything (services, icons, ...) with the same basename.

@Forage
Copy link
Contributor

Forage commented Feb 11, 2020

I think it's a lot of discussion for something not really that important ;-)
The only reason I mentioned it was for awareness, I expect some more people will run into it, but as stated by @bochecha, that's the risk of installing/building intermediate builds.

@ederag
Copy link
Collaborator Author

ederag commented Feb 11, 2020

I think it's a lot of discussion for something not really that important ;-)

There might be more to that. From the gnome wiki:

There are a variety of heuristics used to make the association between application windows and .desktop files for backwards compatibility. These heuristics are complex and still evolving, and will not be detailed here.

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