Re: How can I create a filetype association that uses the filename's extension?



> It sounds like GNOME wasn't installed quite correctly on your
> machine. What distribution are you using?

Ubuntu 10.04 (Lucid)
Kernel Linux 2.632-26-generic
GNOME 2.30.2

I have, to the best of my knowledge, not run any programs that might
do heavy surgery on Gnome (cosmetic or otherwise), including not
messing with gconf-editor.

>> Is it possible to persuade Gnome to treat files with the same MIME
>> type but different filename extensions separately?
>> If yes, how?
>
> It should, by default. The definitions for these are provided by
> the package shared-mime-info. Do you have that package installed?

shared-mime-info is indeed installed.

I should amend my initial report:
* the .py file is, in fact, correctly identified as being of the type
"Python script (text/x-python)", and treated separately as desired.
* I observe the problem only with not-yet-known extensions, such as
*.R or *.mht. (I grepped /usr/share/mime for 'R' and 'mht' as
stand-alone words, and got no hits.)

So, the problem is "no obvious way to 'register a new/unknown
extension'," rather than the "extension ignored when determining
filetype" I initially reported. Sorry about that. Which would be a
problem with the Nautilus 'Open With' dialog rather than a problem
with Gnome itself, in which case I'd better head over to the Nautilus
mailing list. Does that sound right to you?

Cheers, and thanks

Sietse



On Wed, Jan 5, 2011 at 01:01, Shaun McCance <shaunm gnome org> wrote:
> On Tue, 2011-01-04 at 22:31 +0100, Sietse Brouwer wrote:
>> Dear List,
>>
>> I have several kinds of files that Gnome detects as "plain text
>> documents": some with the extension .py, some with .txt, some with
>> .mht . . . you get the picture. The .py files I'd like to open with
>> gVim, the .txt files in SciTE, the .mht files with Opera, et cetera.
>> However, when I try to change the "Open WIth" of any of these file
>> types [1], it changes for all plain text files. The behaviour I desire
>> is that I can associate different programs to files with different
>> extension.
>>
>> Is it possible to persuade Gnome to treat files with the same MIME
>> type but different filename extensions separately?
>> If yes, how?
>
> It should, by default. The definitions for these are provided by
> the package shared-mime-info. Do you have that package installed?
>
> It sounds like GNOME wasn't installed quite correctly on your
> machine. What distribution are you using?
>
> --
> Shaun
>
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]