Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
  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.

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

share|improve this answer

Your Answer


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.