Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I associate a certain file type again with "View file"

After installing a fresh Ubuntu (13.04) pem files (SSL certificates) are associated with "View file" (right click the file in Nautilus I see "Open with View file"), which nicely shows a clear text version of the certificate.

Now I wanted to edit the file and so chose "Open with another application" and selected gedit. It worked, but now I only see "Open with gedit" and cannot revert back to the "View file" program (or add it as another option). I also noticed many applications (for example Sublime, which is available in the Unity Lense) are missing in the dialog where I can choose which application to use for opening the file.

How can I get more (all that are "known" to unity, for example the lense) applications shown in the dialog where I can associate a file type with an application? Where can I find the "View file" application?

like image 400
gucki Avatar asked Jun 04 '13 08:06

gucki


People also ask

How do I associate file types?

Open the Control Panel. In the Control Panel, click the Default Programs option. Click the Associate a file type or protocol with a program option. In the Default apps window, scroll to the bottom and select Choose defaults by file type.


1 Answers

Look at the file:

~/.local/share/applications/mimeapps.list

That will contain something like (this example is for a *.crt file):

[Added Associations]
application/pkix-cert=gvim.desktop;

Remove the offending line. You don't need to restart anything for the change to take effect.

like image 100
GraduateOfAcmeU Avatar answered Sep 18 '22 14:09

GraduateOfAcmeU