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)?

  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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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