Get into the habit of not double-clicking on files to open them. Instead, drag them onto the icon of the program you want to use to open them. So if you drag the JPEG file onto the icon of Photoshop, you'll open it in Photoshop. If you drag it onto the icon of GIMP, you'll have GIMP open it up...