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.

I am running openbox and so do not have access to standard Ubuntu control panel, but must set everything from the terminal. When I download an image in chrome and click open, it launches xdg-open which then launches an arbitrary program (it resorts to Internet Explorer on wine if I uninstall those programs).

How do I control which program is loaded for an image of type .jpg (and others)?

share|improve this question
add comment

1 Answer

  1. Run the command nano ~/.local/share/applications/mimeapps.list (to set for your user only) or sudo nano /usr/share/applications/mimeapps.list (to set for all users).
  2. Find the mime type of the file you want to change (.jpg is image/jpeg). You can find the mime type with the command file --mime-type -b filename
  3. Replace (or add) the line so it reads image/jpeg=eog.desktop (replacing image/jpeg with the type and eog.desktop with the .desktop which you want to use to launch the program.

Note:
If you are using /usr/share/applications/mimeapps.list, you may need to create it see here: Default Applications - ArchWiki

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.