[MonoDevelop] C# source files mime-type with gnome 2.6
jeroen at xs4all.nl
Thu Feb 26 14:56:29 EET 2004
I've already filed a bug against shared-mime-info at freedesktop.org
about this. GNOME 2.4 defines a mime-type of "text/x-csharp" for .cs
files. This is in line with the mime-types for .java files (text/x-
The mime-type used for C# files in gnome-icon-theme is text/x-csharpsrc,
but since a .cs is always a source file (and there are no other source
files), this seems wrong (also filed a bug for that).
On Thu, 2004-02-26 at 13:35 +0100, Marco Canini wrote:
> 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 at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-list
> Marco Canini <marco.canini at fastwebnet.it>
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
More information about the xdg