! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
MIME type of scripts without name extension
Status:
CLOSED: DUPLICATE
Product:
Thunar-vfs
Component:
General

Comments

Description Stefan Stuhr 2006-03-06 16:06:32 CET
I like to have a lot of (Python, shell) scripts without filename extension (.py,
.sh), to make it easier to run them from a terminal or a run dialog, and because
the extension isn't really needed, at least normally.

The problem is, Thunar finds that the files are plain text documents and doesn't
recognize them as scripts. As such, the default action is to open them in a text
editor, and I can't change their executable permissions from within Thunar.

The Python scripts has the first line as follows:
#!/usr/bin/env python
And the shell scripts have either:
#!/bin/sh
or:
#!/bin/bash

The PyXDG function xdg.Mime.get_type(filepath) does return the correct MIME
types of the files.

Reproducible: Always
Steps to Reproduce:




I am using Xfce and Thunar SVN.
Comment 1 Benedikt Meurer editbugs 2006-03-06 16:19:48 CET
You are using shared-mime-info <= 0.16, which doesn't include the mmap()able
mime cache. Thunar includes two implementations, one for the mime cache, and one
for systems with shared-mime-info <= 0.16 (which doesn't yet include support for
detecting the mime type from the file content).

*** This bug has been marked as a duplicate of 1106 ***
Comment 2 Stefan Stuhr 2006-03-06 16:30:27 CET
I do indeed have shared-mime-info 0.16 installed; it seems to be the latest
stable version [1].

Thanks for directing me to bug 1106.

[1]: http://freedesktop.org/wiki/Software_2fshared_2dmime_2dinfo (but I strongly
suspect that you already know that website ;) )

Bug #1549

Reported by:
Stefan Stuhr
Reported on: 2006-03-06
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information