Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Everytime I try to open Ubuntu (any version, since from 8.04 with which I started) default wallpaper, named "warty-final-ubuntu.png", I get the following error.

Image Viewer

I have also reported bug for the same, more than a year ago but it is still unresolved. Also I don't get the point why the default wallpaper is still named as "warty-final-ubuntu.png" instead of having actual code name prefix to which wallpaper belongs eg. "precise-final-ubuntu.png" and so on.

General Thoughts

Lots of community effort goes under development of this marvelous distribution but we're still missing out to fix such silly issues, which is directly/indirectly affecting the number of new adopters.

share|improve this question
1  
There is more wrong with that image than at 1st glance (see my answer) Looks like someone else took over that package in the beginning of 2012. Maybe someone is fixing it since there are changes pending: "Ubuntu branches: Pending requested 2012-04-09" (bug: bugs.launchpad.net/ubuntu/+source/ubuntu-wallpapers/+bug/296538 ) –  Rinzwind Jun 10 '12 at 5:42
    
@Rinzwind: Thanks, also can anyone point me to the reason why default wallpaper is still named warty-final-ubuntu instead of something that's specific to Ubuntu version? Or shall I assume that Ubuntu spin's configurations has this name hard-coded since very beginning and nobody is bothered to change this. :-D –  Kush Jun 10 '12 at 7:50

2 Answers 2

up vote 1 down vote accepted

You are trying to open the wrong file.

file /usr/share/backgrounds/warty-final-ubuntu.png
/usr/share/backgrounds/warty-final-ubuntu.png: JPEG image data, JFIF standard 1.02

The file is a JPG and not a PNG. You should open /usr/share/unity-2d/warty-final-ubuntu.jpg since it is a symlink to your file:

file /usr/share/unity-2d/warty-final-ubuntu.jpg
/usr/share/unity-2d/warty-final-ubuntu.jpg: symbolic link to `../backgrounds/warty-final-ubuntu.png'

Example with your image (eog is the command line name of image viewer).

enter image description here

share|improve this answer
    
Ok I understand that image viewer will fail to open a Symlink, but what if I have that image copied to different partition, which is accessible in Windows, and I can view that image in Windows (with same PNG extension), but not with eog on Ubuntu? –  Kush Jun 10 '12 at 7:46
    
No, symlinking is not the problem. 1. eog fails to recognize it being a jpg and not a png. That's a bug (see eliah's answer for that) 2. the file being named a png is also a bug (already solved; see the bugreport in comments at the question; somewhere in there it is stated that it is fixed). Regarding the name: the maintainer of the package never changed it. why? nooo idea. But it looks like we got a new person since april. So maybe it'll change soon(ish). –  Rinzwind Jun 10 '12 at 8:29

You're right that this is a bug. Rinzwind's answer explains what is going wrong--eog assumes the file is a PNG because its suffix is .png. That behavior is itself a bug, since sometimes images have the wrong suffix. Most other image viewers will look inside a file to determine its file type (at least if the initial attempt to open it based on its file extension fails).

I've verified this behavior and marked your Launchpad bug a duplicate of bug 172416, which is the bug for eog's failure to autodetect image type.

If you need to open an image that has the wrong suffix in eog, you can rename it or, if it's needed with its current name, you can make a symbolic link to it (as Rinzwind explains already exists for the background wallpaper you're trying to open).

To see how to make a symbolic link, see man ln. Use the -s flag to make symbolic (instead of hard) links.

For example, if you have a Pictures folder inside your home folder, and it contains a file called foo.png which is actually a JPEG, you can make a symbolic link to it named like a JPEG with:

cd ~/Pictures
ln -s foo.png foo.jpg

One key thing to remember when making symbolic links from the command line is that you specify the target first, and the source second. (That is, the link you are making is not the first argument.)

share|improve this answer
    
I'm aware of symlinks, and the way how to create it, but didn't knew that this image is symbolic link, since I use this same wallpaper in Windows too (while symlinks are not cross-platform). –  Kush Jun 10 '12 at 8:37
    
@Kush As Rinzwind said, symlinking is not the problem. eog opens symlinks just fine. What eog does not do properly is open files whose extensions (the short sequences of characters following the final . in the file's name) designate that they are of an image type that is different from the image type they really are. You can create a symbolic link whose name has the right extension as a workaround to this problem (in other words, symlinking is not hurting, symlinking can help you with this). –  Eliah Kagan Jun 10 '12 at 8:43
    
Also, Windows does support symbolic links on NTFS (i.e., Windows-style) volumes. This is a little-known feature, and it doesn't work quite the same way as symbolic links in a Unix-like filesystem (for example, file-like symbolic links and directory-like symbolic links are two separate kinds of filesystem entries in NTFS.) If you ever find that you need to use symbolic links on NTFS volumes in Ubuntu, you may want to post a separate question about that. –  Eliah Kagan Jun 10 '12 at 8:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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