Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I open a text file that does not have the .txt extension, Gedit sets the syntax highlighting to Apache Conf every single time.

This only started happening after my upgrade to 11.04. Is there a reason why Gedit never recognizes plain text anymore?

Edit: Here's ~/.local/share/applications/mimeapps.list. I don't think anything looks out of the ordinary:

[Added Associations]
video/x-msvideo=vlc.desktop;
audio/mpeg=vlc.desktop;
application/x-extension-ini=gedit.desktop;
video/x-matroska=vlc.desktop;
x-content/audio-player=kde4-amarok.desktop;rhythmbox.desktop;vlc.desktop;banshee-1-media-player.desktop;kde-amarok.desktop;
application/x-mswrite=gedit.desktop;
video/ogg=vlc.desktop;
video/mp4=vlc.desktop;
video/quicktime=vlc.desktop;
text/x-tex=kde4-kile.desktop;texmaker.desktop;gedit.desktop;emacs22-gtk.desktop;openoffice.org-writer.desktop;emacsclient-emacs22.desktop;gvim.desktop;userapp-kile-HQC94U.desktop;
video/x-flv=vlc.desktop;
application/x-font-otf=gnome-font-viewer.desktop;
application/vnd.openofficeorg.extension=file-roller.desktop;wine.desktop;mount-archive.desktop;openoffice.org-calc.desktop;
image/jpeg=gthumb.desktop;
application/x-font-ttf=gnome-font-viewer.desktop;
image/x-nikon-nef=gthumb.desktop;kde4-dngconverter.desktop;f-spot-view.desktop;eog.desktop;gimp.desktop;evince.desktop;
application/x-shellscript=gedit.desktop;wine-extension-txt.desktop;emacs22-gtk.desktop;openoffice.org-writer.desktop;emacsclient-emacs22.desktop;
application/x-cd-image=nautilus-cd-burner-open-iso.desktop;mount-archive.desktop;brasero.desktop;gmount-iso.desktop;file-roller.desktop;vlc.desktop;
application/x-extension-htaccess=gedit.desktop;
application/x-trash=gedit.desktop;
inode/fifo=gedit.desktop;
application/x-extension-config=gedit.desktop;
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;openoffice.org3-writer.desktop;openoffice.org-writer.desktop;file-roller.desktop;mount-archive.desktop;gedit.desktop;
application/pdf=evince.desktop;AdobeReader.desktop;
video/x-ms-wmv=vlc.desktop;
video/mpeg=vlc.desktop;
image/png=gthumb.desktop;
image/x-panasonic-raw=wine-extension-raw.desktop;f-spot-view.desktop;gedit.desktop;
text/x-log=gedit.desktop;wine-extension-LOG.desktop;wine-extension-txt.desktop;emacs23.desktop;
application/x-spss-sav=gedit.desktop;
text/plain=gedit.desktop;userapp-localc-Y5UVUV.desktop;wine-extension-txt.desktop;openoffice.org-writer.desktop;emacs23.desktop;gvim.desktop;openoffice.org-calc.desktop;
audio/x-flac=vlc.desktop;
audio/midi=totem.desktop;vlc.desktop;gnome-mplayer.desktop;banshee-1.desktop;
text/x-makefile=gedit.desktop;
application/rtf=libreoffice-writer.desktop;openoffice.org3-writer.desktop;
text/x-ocaml=gedit.desktop;
image/x-eps=evince.desktop;gimp.desktop;gedit.desktop;wine-extension-txt.desktop;openoffice.org-writer.desktop;emacs23.desktop;gvim.desktop;openoffice.org-calc.desktop;gthumb.desktop;
inode/directory=nautilus-folder-handler.desktop;vlc.desktop;
application/x-extension-ctl=gedit.desktop;
application/x-executable=wine-extension-caf.desktop;
application/xspf+xml=vlc.desktop;totem.desktop;banshee-1.desktop;firefox.desktop;google-chrome.desktop;wine-extension-xml.desktop;opera-browser.desktop;thunderbird.desktop;gedit.desktop;wine-extension-txt.desktop;openoffice.org-writer.desktop;emacs23.desktop;gvim.desktop;openoffice.org-calc.desktop;
application/vnd.ms-publisher=gedit.desktop;
application/msword=libreoffice-writer.desktop;
application/vnd.ms-powerpoint=libreoffice-impress.desktop;
audio/x-wav=vlc.desktop;
text/html=userapp-google-chrome-YOQ3QV.desktop;
application/octet-stream=userapp-wireshark-73P9RV.desktop;
application/vnd.ms-excel=libreoffice-calc.desktop;
text/csv=libreoffice-calc.desktop;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop;
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
text/x-c++src=gedit.desktop;wine-extension-txt.desktop;
x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;
video/3gpp=vlc.desktop;
application/x-ms-dos-executable=wine.desktop;

[Removed Associations]
text/html=userapp-google-chrome-CY5RQV.desktop;

[Default Applications]
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
video/3gpp=vlc.desktop
application/x-ms-dos-executable=wine.desktop
share|improve this question

closed as too localized by fossfreedom Feb 20 '12 at 23:49

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Try deleting Gedit's user's preferences (in your Home), and if that doesn't work, delete it's .conf file. –  Oxwivi May 9 '11 at 17:57
    
That didn't seem to help, as it only cleared items shown in the configuration GUI anyway. A reinstall through Synaptic didn't help, but I can't do a complete remove and then reinstall since ubuntu-desktop depends on gedit. –  yavoh May 9 '11 at 18:57
    
That just confirmed it has nothing to do with Gedit's settings. I am too inexperienced and lacking in knowledge to help further. –  Oxwivi May 9 '11 at 19:00
    
did you check mimetypes? (see ~/.local/share/applications/mimeapps.list and man mimetype) –  Rinzwind May 9 '11 at 20:20
    
Nothing seems out of the ordinary there. I've added the list up above. –  yavoh May 9 '11 at 21:56