How do I remove a nautilus file association I made?

Asked by Joachim Noreiko

Because a .htaccess file in a nautilus FTP window wouldn't open by double-clicking, I did Open With... and selected Gedit.

Now nautilus thinks that .htaccess is a different file type and not a text file.
It won't let me open any .htaccess files on my local filesystem because it says they look like text files from their contents.

How do I remove this association?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Markus Thielmann
Solved:
Last query:
Last reply:
Revision history for this message
Utkarshraj Atmaram (utcursch) said :
#1

Right click on the file and select Properties. This will open the properties window. Select the tab "Open With". Now select the file association and click Remove. (The remove button will be enabled only for the file associations made by you).

Revision history for this message
Joachim Noreiko (jnoreiko) said :
#2

The properties window's Open With tab also thinks this is a text document. It says:
'Select an application to open .htaccess and others of type "plain text document".

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

Perhaps removing the .htaccess association from /usr/share/mime-info/gnome-vfs.mime works. Back it up before, just in case .....

Revision history for this message
Joachim Noreiko (jnoreiko) said :
#4

There's no text 'htaccess' in that file (or in its directory).
I have a ./.gnome/gnome-vfs but it's an empty directory.

Revision history for this message
Best Markus Thielmann (thielmann) said :
#5

Thanks for your question.

1) run "gksudo gedit ~/.local/share/mime/packages/Override.xml"
2) locate: <mime-type type="application/x-extension-htaccess"><comment>htaccess document</comment><glob pattern=".htaccess"/></mime-type>
3) change to: locate: <mime-type type="text/x-extension-htaccess"><comment>htaccess document</comment><glob pattern=".htaccess"/></mime-type>
4) run "update-mime-database ~/.local/share/mime"

Now you're able to choose a editor for .htaccess files and another one for "other" plain text files. If you don't want Nautilus to differ between "other" files and .htaccess files, just delete (2) and run (4).

Revision history for this message
Markus Thielmann (thielmann) said :
#6

Just a short supplement: Don't forget to reload Nautilus' window before clicking on the .htacess file. Do so by pressing F5. Otherwise Nautilus won't recognize the change in Override.xml.

Revision history for this message
Joachim Noreiko (jnoreiko) said :
#7

Thanks Markus Thielmann, that solved my question.

Revision history for this message
AnGus (ozsolarwind) said :
#8

Thanks Marcus from me too. This solved a frustration I've had in nicely associating .mm files with FreeMind.