Eye of GNOME does not load JPG


I tried to open a JPG image file using Eye of GNOME. It failed with this error:

Could not load image 'foo.jpg'
Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)

When I opened the same file using another image viewer, it opened without any problem!

Another symptom of this problem is that the thumbnail of the image file is not displayed in Nautilus or in Nemo file explorers. All of these programs use the same backend for image display.


This problem is typically caused when the image is actually a PNG file. Some apps on Android are notorious for saving all image formats as JPG.

As noted by EOG, the file starts with the magic identifier 0x89 0x50, which is for PNG format. You can also check the same by using the file command:

$ file foo.jpg
foo.jpg: PNG image data, 716 x 960, 8-bit/color RGB, non-interlaced

We can see that file reports this JPG file as containing PNG image data.

Just rename the JPG file with the correct .png file extension and EOG will open it correctly. You will also see that thumbnails are now rendered correctly.

Admittedly, EOG could have detected the format correctly and shown a more informative error message. I have seen other image viewers do that. This has been filed as a bug here.

Tried with: Eye of GNOME 3.10.2 and Ubuntu 14.04


How to execute text files in Nemo


If you click on a shell script in Nemo, it tries to display the text of the file. This happens even if the executable permission bit is set on the file.


This default behavior is to protect you from mistakenly executing malicious files. To execute these files on clicking them, go to Edit > Preferences > Behavior > Executable text files and change the setting to what you want.

Tried with: Nemo 1.8.4 and Ubuntu 14.04

How to set Nemo as default file manager

I find the Nautilus in recent Ubuntu versions quite irritating. Several nice features have been removed. Thankfully, Nemo, a fork of Nautilus, still has those features.

To make Nemo the default manager:

$ xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

To make Nemo handle the desktop:

$ gsettings set org.gnome.desktop.background show-desktop-icons false
$ gsettings set org.nemo.desktop show-desktop-icons true

Warning: Do not use exo-preferred-applications utility to set Nemo as default file manager. It works, but disables xdg-open.

Tried with: Nemo 1.8.4 and Ubuntu 14.04

Nemo File Manager

Nemo is a file manager for Linux that is a fork of Nautilus. In recent versions of GNOME or Ubuntu, Nautilus has been simplified and lots of features have been removed. For example, I like to use Compact View and this has been removed in the Nautilus in Ubuntu 14.04. If you need a file manager that is similar to the old Nautilus, but having a good set of features, then pick Nemo.

If you are using an older version of Ubuntu, add the PPA:

$ sudo add-apt-repository ppa:webupd8team/nemo
$ sudo apt-get update

Installing Nemo is the same in all versions of Ubuntu:

$ sudo apt-get install nemo

If you would like to make Nemo your default file manager, please see this post.

Tried with: Nemo 2.0.8 and Ubuntu 12.04