I'm using shared-mime-info 1.1 and files with the shbang line "#!/usr/bin/python" or similar variants like specifying a version as "#!/usr/bin/python2" and "#!/usr/bin/python3" are not shows as executable files.
I've applied the following change to tests/test.py: -#!/usr/bin/python +#!/usr/bin/python3 And the test suite detects it as Python just fine. What exactly were you expecting to happen? shared-mime-info detects mime-types, not whether files are executable or not.
The title is maybe a little confusing. My system doesn't detect the mimetype of these files. The logical result is just that they aren't shown as executable files too.
Do you have such example files? Because I cannot reproduce the problem here.
Created attachment 86853 [details] Example python-file whose mime type isn't detected Here is an example file. It isn't shown as python file on my system. But I have also opened shortly after this report a bug on the Ubuntu tracker in case this bug is not caused by shared-mime-info: https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1216788
test: name: application/octet-stream data: text/x-python file: text/x-python Please test with shared-mime-info 1.2, released today :)
With which cli-application are you testing the file?
print-mime-data in xdgmime. That's part of the shared-mime-info test suite.
xdg-utils is installed and xdg-mime --version shows "xdg-mime 1.0.2" but the command print-mime-data isn't available and I can't figure out in which package it is.
(In reply to comment #8) > xdg-utils is installed and xdg-mime --version shows "xdg-mime 1.0.2" but the > command print-mime-data isn't available and I can't figure out in which > package it is. xdgmime: http://cgit.freedesktop.org/xdg/xdgmime The reference implementation of the shared mime specification. Not garbage shell scripts.
> The reference implementation of the shared mime specification. Not garbage shell scripts. Maybe I don't fully understand you. Without a cli-application this will be a little difficult to test. I think I will just wait until shared-mime-info 1.2 gets into Ubuntu and retest then if the icons are drawn correctly.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/75.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.