When grabbing photos from my iPhone I often find that it has a funny idea of where “up” actually is and while the EXIF data always allows you to correct the problem I’d rather my image was simply the correct way up to start with and an EXIF rotate tag of 0 degrees rather than upside down with an EXIF rotate tag of 180 degrees!
Luckily I discovered a little utility that can be plugged in to the nautilus file/folder browser on the gnome desktop which lets you simply Ctrl-click the errant photos and then right click and hit rotate, later entering the amount you wish to compensate the images by and away it goes and batch rotates the images for you.
To install on Ubuntu (or any other Debian based system) just run the following
sudo apt-get install nautilus-image-converter
Enjoy your properly orientated photos!