[MonoDevelop] C# source files mime-type with gnome 2.6
Marco Canini
marco.canini@fastwebnet.it
Thu, 26 Feb 2004 13:35:03 +0100
You're raising two problems:
1) shared-mime from fd.o should include .cs file type
2) what's the right mime type for csharp source code?
I didn't find anything official.
In http://filext.com there's no mime too.
On Thu, 2004-02-26 at 08:48, Jeroen Zwartepoorte wrote:
> Hi,
>
> With GNOME 2.6, we're using the shared-mime-info from freedesktop now.
> This differs from GNOME 2.4. One of the changes (bugs?) is that .cs
> files will now appear to be application/octet-stream to nautilus (and
> the rest of GNOME) instead of text/x-csharp.
>
> If you want to quickly fix it and get gedit, MD and the rest to
> automatically highlight C# files you need to do this:
>
> 1. Open $prefix/share/mime/packages/freedesktop.org.xml for editing.
> 2. Locate the "text/x-csrc" string.
> 3. Copy the <mime-type> tag from the C source after that one. Change the
> type to "text/x-csharp". Change the <glob> pattern to "*.cs" and change
> the <comment> to "C# source code.
>
> It should look something like this:
>
> <mime-type type="text/x-csharp">
> <comment>C# source code</comment>
> <comment xml:lang="no">C#-kildekode</comment>
> <glob pattern="*.cs" />
> </mime-type>
>
> 4. Save the file, and run update-mime-database from a terminal: update-
> mime-database $prefix/share/mime/
> 5. Restart nautilus and perhaps the gnome-vfs-daemon (not sure whether
> the latter is really necessary). You also need to restart gedit/MD to
> get it use the new mimetype.
>
> HTH,
>
> Jeroen
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
--
Marco Canini <marco.canini@fastwebnet.it>