[Bug 64869] Re: GEdit opens java files with C source highlighting

zizou spamit at justmail.de
Tue Nov 21 09:06:13 UTC 2006


I stumbled upon this issue after upgrading from Ubuntu 6.06 to 6.10.

The following "patch" worked for me:

1. Open the file Override.xml (create it when missing)

On console:
gedit ~/.local/share/mime/packages/Override.xml

2. Make the file look the following (but don't remove other possible
entries you might have):

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">  
  <mime-type type="application/x-javascript">
    <sub-class-of type="text/plain"/>
    <comment>Javascript program</comment>
    <glob pattern="*.js"/>
    <magic priority="30">
      <match value="/*" type="string" offset="0"/>
      <match value="//" type="string" offset="0"/>
    </magic>
  </mime-type>
</mime-info>

3. Rebuild the mime-type database. The changes should be instant-
applied, but if not try logging out and logging back in.

On console:
update-mime-database ~/.local/share/mime

-- 
GEdit opens java files with C source highlighting
https://launchpad.net/bugs/64869




More information about the desktop-bugs mailing list