I tried to set document viewer default application.
2 Answers
Below is the procedure that helped me in resolving this annoying problem.
By Mina Michael:
You don't need to delete the file and lose all the associations. You could just remove the lines that associate PDF to imagemagick. I just removed the following lines from ~/.config/mimeapps.list, and it worked!
image/pdf=display-im6.desktop
image/pdf=display-im6.q16.desktop;display-im6.desktop;
Regards, Attique
-
1Welcome to Ask Ubuntu! Say, would you mind adding some attribution here? A link to Mina Michael's work and perhaps his profile too would be great. Thanks! Jul 10, 2017 at 11:56
Thanks Attique, for posting this solution! It is the first that pointed me to the correct file >>>>> ~/.config/mimeapps.list
I wanted to associate tiff and tif files with the ImageJ application. - I first created an ImageJ.desktop file in /usr/share/applications/ with the following contents:
Version=1.0
Name=ImageJ
Comment=ImageJ Launcher
Exec=/home/vanmetter/.ImageJ/ImageJ
Icon=/home/vanmetter/.ImageJ/images/icon.png
Terminal=false
Type=Application
Categories=Utility;Application;
(see other posts for how to create .desktop files)
I then added:
image/tiff=ImageJ.desktop
image/tif=ImageJ.desktop
to the [Defaults Applications] section of ~/.config/mimeapps.list. Choose either the [Default Applications] section or the [Added Associations] section as desired.
Now, my tiff and tif files open (double click) with ImageJ as the default program. If I had used the [Added Associations] section, I would right-click on the file and ImageJ would be offered as an alternate application to open tiff and tif files.
evince
, and use it for PDF, PostScript, DjVu, TIFF, XPS and DVI . ... ImageMagick has a viewer command :display file.jpg
. ImageMagick is for images google.com/… ( can open some pdf ? )