i3lock: setting the image background in Ubuntu Precise
The version included in the Ubuntu Precise repository is "i3lock: version 2.2 (2011-11-06) © 2010-2011 Michael Stapelberg". This version does not seem to honor the '-i' option for setting a PNG image. (just in case, I tried with a JPG too, still no luck)
I've found in a question on this very faq website mentioned that in Fedora the '-i' is not compiled in. Is that the case for Precise too? (however, both the man page and the usage '--help' message have the '-i image.PNG' option shown as available).
Update: Actually i3lock works ok, but the problem lies with the Ubuntu default background file and is quite silly: I was attempting to set as image "/usr/share/backgrounds/warty-final-ubuntu.png
" (which happens to be the default background used by Precise, the one I am currently using as background now and the only .png file in that directory, the others being .jpg). However, despite having a .png extension, that image file is actually a JPEG ... :| (a tiny warning on stderr that the image failed to load or is not a valid png could help in similar situations, but it's up to you)
Sorry for the noise.
There already was a message, but it only showed when you ran i3lock in debug mode. I just changed the code to print it always since I don’t see any reason for having that in debug mode only. Unfortunately, the message doesn’t give a good reason (like "you passed a JPEG file"), improvements welcome.
Thanks. Any hint that something is wrong with the file is more than good enough and anyhow way better than no message.
Any reason why it can't be a JPEG image?