Bug 68494 - #!/usr/bin/python files and similar variants are not shown as executable files
Summary: #!/usr/bin/python files and similar variants are not shown as executable files
Status: RESOLVED MOVED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-24 02:14 UTC by sworddragon2
Modified: 2018-10-13 10:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Example python-file whose mime type isn't detected (19 bytes, text/plain)
2013-09-30 15:04 UTC, sworddragon2
Details

Description sworddragon2 2013-08-24 02:14:45 UTC
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.
Comment 1 Bastien Nocera 2013-09-30 08:55:46 UTC
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.
Comment 2 sworddragon2 2013-09-30 10:13:35 UTC
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.
Comment 3 Bastien Nocera 2013-09-30 12:41:10 UTC
Do you have such example files? Because I cannot reproduce the problem here.
Comment 4 sworddragon2 2013-09-30 15:04:05 UTC
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
Comment 5 Bastien Nocera 2013-09-30 15:16:25 UTC
test:
	name: application/octet-stream
	data: text/x-python
	file: text/x-python

Please test with shared-mime-info 1.2, released today :)
Comment 6 sworddragon2 2013-09-30 15:36:04 UTC
With which cli-application are you testing the file?
Comment 7 Bastien Nocera 2013-09-30 15:41:23 UTC
print-mime-data in xdgmime.

That's part of the shared-mime-info test suite.
Comment 8 sworddragon2 2013-09-30 15:50:01 UTC
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.
Comment 9 Bastien Nocera 2013-09-30 15:51:45 UTC
(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.
Comment 10 sworddragon2 2013-09-30 15:56:37 UTC
> 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.
Comment 11 GitLab Migration User 2018-10-13 10:40:56 UTC
-- 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.