[CentOS] Re: Changing default file type in Centos 6

Sun Feb 28 14:59:22 UTC 2016
Yamaban <foerster at lisas.de>

On Sun, 28 Feb 2016 15:37, H wrote:
> On 02/28/2016 12:27 AM, Liam O'Toole wrote:
>>  On 2016-02-27, Frank Cox wrote:
>> >  On Sat, 27 Feb 2016 16:33:00 -0500 H wrote:
>> > 
>> > >  No, that I already did. I am talking about the file type when you
>> > >  open a graphical directory window.
>> >  I'm missing something here.  Do you mean that you want to change icon
>> >  that shows up in a Nautilus window for a particular filetype?
>> >
>>  I think the OP is talking about the file type that Nautilus reports when
>>  you right-click on a file and bring up the 'Properties' dialog.
>>  In my case (also CentOS 6) Naulitus reports 'Genesis ROM' for files with
>>  the .md extension. The file command, on the other hand, reports 'ASCII
>>  English text'.
>>  The file responsible for the behaviour of Nautilus is
>>  /usr/share/mime/application/x-genesis-rom.xml, which appears to have
>>  been generated by update-mime-database.
> Correct. I looked at that file and it says "created automatically by 
> update-mime-database. do not edit" which begs the question: how can I "correct 
> this?"

IMHO something is fishy in your install here.

/usr/share/mime/application/x-genesis-rom.xml is generated from:
/usr/share/mime/packages/freedesktop.org.xml by the
update-mime-database tool

for "Genesis ROM" the glob pattern="*.gen" is set and
as well as the "magic"  patterns:
       match value="SEGA" type="string" offset="256"
       match value="EAGN" type="string" offset="640"
       match value="EAMG" type="string" offset="640"

Just how are your "text/markdown", glob pattern="*.md" files
"discovered" as "Genesis ROM" ??


to disable the future creation of the file:
you have to comment out the relevant section in:

then remove /usr/share/mime/application/x-genesis-rom.xml
and run the update-mime-database as root.

Be aware, future updates of the file:
will re-enable the application/x-genesis-rom mime-type.

Have a nice sunday
  - Yamaban.