I installed the development version of Gimp, then found it too buggy, so switched back to the Ubuntu repository version. In doing so, somehow Gnome/Unity/whatever became confused and now fails to open gimp either from the sidebar, the lens thingy, or clicking on an xcf file.
gimp from the command line works fine, and
which gimp outputs
/usr/bin/gimp, which is correct.
How to fix the problem?