Creating custom MIME type article: Alter step to create non-empty file
In both Ubuntu 22 and 23, there's a missing step for the documentation on this page:
The article mentions using touch test.xyz
to create an empty file, just before checking its content-type with gio info test.xyz | grep "standard::content-type"
. If you actually follow the steps, the reported content type will be "text/plain" in Ubuntu 22 and "application/x-zerosize" in Ubuntu 23, rather than "application/x-newtype" as the article says it should be.
The problem seems to be that a NON-EMPTY file should be created. So instead of a touch command, perhaps something like echo XYZ > test.xyz
should be used. After that's done, then the content-type is reported as "application/x-newtype", as expected.
Probably the similar documentation at the following page is also affected, but I did not check: