LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   CentOS 5 will not show PNG icons, errors when X starts. (https://www.linuxquestions.org/questions/linux-desktop-74/centos-5-will-not-show-png-icons-errors-when-x-starts-798209/)

vectro 03-27-2010 04:33 AM

CentOS 5 will not show PNG icons, errors when X starts.
 
This is related to remote desktop over VNC. I'm not sure if this should be posted in the Desktop or Server section. I'm sure a mod will move this if necessary.

In short, the problem is that CentOS 5 won't recognize PNG files. There are a few errors about it when X starts. The end result is that icons in PNG format don't show up on the desktop or in the menus. I tried re-installing gtk2 and libpng but with no success.

Here are 4 related errors that show when X is started:

Quote:

/usr/bin/gnome-session: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/libexec/gconf-sanity-check-2: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
Quote:

** (gnome-session:31286): WARNING **: Failed to load image from '/usr/share/pixmaps/splash/gnome-splash.png': Couldn't recognize the image file format for file '/usr/share/pixmaps/splash/gnome-splash.png'
Quote:

(eggcups:31356): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `pixbuf != NULL' failed
Quote:

(gnome-panel:31350): Gtk-WARNING **: Error loading theme icon for stock: Couldn't recognize the image file format for file '/usr/share/icons/Clearlooks/24x24/gtk/gtk-ok.png'

unSpawn 03-27-2010 08:55 PM

AFAIK libpng12 should reside in /usr/lib/ and not /usr/local/lib/. So what did you do that makes this a non-standard install of that library and does one reside in /usr/lib?

vectro 03-28-2010 06:47 PM

Quote:

Originally Posted by unSpawn (Post 3914950)
So what did you do that makes this a non-standard install of that library and does one reside in /usr/lib?

Thanks for your reply. When I saw the problem for the first time, I did:

Code:

yum remove libpng
yum install libpng

libpng is not in /usr/lib

unSpawn 03-29-2010 06:30 AM

Can you post what 'rpm -qf /usr/local/lib/libpng12.so.0' returns? And 'rpm -ql $(rpm -qf /usr/local/lib/libpng12.so.0)'? Do you by any chance export a LD_LIBRARY_PATH ?

vectro 03-29-2010 01:22 PM

Quote:

Originally Posted by unSpawn (Post 3916579)
Can you post what 'rpm -qf /usr/local/lib/libpng12.so.0' returns?

[root@server ~]# rpm -qf /usr/local/lib/libpng12.so.0
file /usr/local/lib/libpng12.so.0 is not owned by any package

Quote:

Originally Posted by unSpawn (Post 3916579)
And 'rpm -ql $(rpm -qf /usr/local/lib/libpng12.so.0)'?

[root@server ~]# rpm -ql $(rpm -qf /usr/local/lib/libpng12.so.0)
/usr/bin/file
/usr/include/magic.h
/usr/lib/libmagic.a
/usr/lib/libmagic.so
/usr/lib/libmagic.so.1
/usr/lib/libmagic.so.1.0.0
/usr/share/doc/file-4.17
/usr/share/doc/file-4.17/LEGAL.NOTICE
/usr/share/doc/file-4.17/README
/usr/share/file
/usr/share/file/magic
/usr/share/file/magic.mgc
/usr/share/file/magic.mime
/usr/share/file/magic.mime.mgc
/usr/share/magic
/usr/share/magic.mime
/usr/share/man/man1/file.1.gz
/usr/share/man/man3/libmagic.3.gz
/usr/share/man/man5/magic.5.gz
/usr/share/misc/magic
package /usr/local/lib/libpng12.so.0 is not installed
package is is not installed
package not is not installed
package owned is not installed
package by is not installed
package any is not installed
package package is not installed

Quote:

Originally Posted by unSpawn (Post 3916579)
Do you by any chance export a LD_LIBRARY_PATH ?

Not quite sure what you mean by that, but will give you info if you explain how.

unSpawn 03-29-2010 05:06 PM

Quote:

Originally Posted by vectro (Post 3917027)
[root@server ~]# rpm -qf /usr/local/lib/libpng12.so.0
file /usr/local/lib/libpng12.so.0 is not owned by any package

Like I said before libpng12.so resides in /usr/lib, not /usr/local/lib, so this kind of confirms what I thought: your /usr/local/lib/libpng12.so.0 isn't installed by RPM. Question now is how it got there and if you need it. BTW existing LD_LIBRARY_PATH should be visible by just doing 'echo $LD_LIBRARY_PATH' unless set only in some startup script. Then, and only if that something is running, running something like 'find /proc/ -maxdepth 1 -name environ | xargs -iX grep -a LD_LD_LIBRARY_PATH 'X' ' could show.

vectro 03-30-2010 03:36 AM

Quote:

Originally Posted by unSpawn (Post 3917222)
Question now is how it got there and if you need it.

I have no idea why it installed, like that. I just used yum.

Quote:

Originally Posted by unSpawn (Post 3917222)
BTW existing LD_LIBRARY_PATH should be visible by just doing 'echo $LD_LIBRARY_PATH'

Code:

[root@order4992 ~]# echo $LD_LIBRARY_PATH

[root@order4992 ~]#

Shows nothing.

I'm unclear about the second command you mentioned. Should I just run it or do I need to check start-up scripts first?

unSpawn 03-30-2010 04:51 AM

Quote:

Originally Posted by vectro (Post 3917672)
I have no idea why it installed, like that. I just used yum.

The message "file /usr/local/lib/libpng12.so.0 is not owned by any package" means that it is not part of a package the RPMDB (/var/lib/rpm/.*) knows about. Ergo it was not installed using either 'rpm' directly or 'yum'. While I haven't booted my F12 to confirm, libpng is centric to the system (meaning it should reside in /usr/lib.*) and not a local addition (which the FSSTND or FHS or whatever standard is current will tell you should go in /usr/local/.*).


Quote:

Originally Posted by vectro (Post 3917672)
I'm unclear about the second command you mentioned. Should I just run it or do I need to check start-up scripts first?

You can run it NP or check SysV init scripts first. Your call. In the end, if there is no documented use for the library and:
0) LD_LIBRARY_PATH doesn't export /usr/local/lib, and
1) no currently running process uses /usr/local/lib/libpng12.so.0 ('/usr/sbin/lsof -Pwn | grep '/usr/local/lib/libpng';'), and
2) /etc/ld.so.conf.d/ doesn't include a file that covers /usr/local/lib ('grep -r '/usr/local/' /etc/ld.so.conf.d/') and
3) ldconfig doesn't show any ('/sbin/ldconfig -p|grep '/usr/local/lib/libpng';'),
then you could rename the library before deciding to (make a backup and) remove it.

After that install libpng with yum (unless 'locate libpng' already shows it to reside in /usr/lib), run ldconfig, run prelink (if applicable) and test.

vectro 03-30-2010 03:04 PM

Quote:

Originally Posted by unSpawn (Post 3917734)
0) LD_LIBRARY_PATH doesn't export /usr/local/lib

It was just blank, liked it showed.

Quote:

Originally Posted by unSpawn (Post 3917734)
1) no currently running process uses /usr/local/lib/libpng12.so.0 ('/usr/sbin/lsof -Pwn | grep '/usr/local/lib/libpng';')

Code:

[root@server ~]# /usr/sbin/lsof -Pwn | grep '/usr/local/lib/libpng'
gnome-ses  7846 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
gnome-set  7886 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
metacity  7906 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
gnome-pan  7910 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
nautilus  7912 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
eggcups    7919 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
pam-panel  7949 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
wnck-appl  7965 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
trashappl  7967 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
mixer_app  7977 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
clock-app  7979 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
notificat  7981 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
gnome-scr  8017 root  mem    REG        8,5  257973  88686845 /usr/local/lib/libpng12.so.0.1.2.42
httpd    17256 root  mem    REG        8,5  257973  88686846 /usr/local/lib/libpng.so.3.1.2.42

Quote:

Originally Posted by unSpawn (Post 3917734)
2) /etc/ld.so.conf.d/ doesn't include a file that covers /usr/local/lib ('grep -r '/usr/local/' /etc/ld.so.conf.d/')

Code:

[root@server ~]# grep -r '/usr/local/' /etc/ld.so.conf.d/
[root@server ~]#

Quote:

Originally Posted by unSpawn (Post 3917734)
3) ldconfig doesn't show any ('/sbin/ldconfig -p|grep '/usr/local/lib/libpng';'),
then you could rename the library before deciding to (make a backup and) remove it.

Code:

[root@server ~]# /sbin/ldconfig -p|grep '/usr/local/lib/libpng'
        libpng12.so.0 (libc6) => /usr/local/lib/libpng12.so.0
        libpng12.so (libc6) => /usr/local/lib/libpng12.so
        libpng.so.3 (libc6) => /usr/local/lib/libpng.so.3
        libpng.so (libc6) => /usr/local/lib/libpng.so

Quote:

Originally Posted by unSpawn (Post 3917734)
After that install libpng with yum (unless 'locate libpng' already shows it to reside in /usr/lib), run ldconfig, run prelink (if applicable) and test.

Code:

[root@server ~]# locate libpng
/usr/bin/libpng-config
/usr/bin/libpng12-config
/usr/include/libpng12
/usr/include/libpng12/png.h
/usr/include/libpng12/pngconf.h
/usr/lib/libpng.a
/usr/lib/libpng.so
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.10.0
/usr/lib/libpng12.a
/usr/lib/libpng12.so
/usr/lib/libpng12.so.0
/usr/lib/libpng12.so.0.10.0
/usr/lib/gthumb/modules/libpngexporter.la
/usr/lib/gthumb/modules/libpngexporter.so
/usr/lib/pkgconfig/libpng.pc
/usr/lib/pkgconfig/libpng12.pc
/usr/local/bin/libpng-config
/usr/local/bin/libpng12-config
/usr/local/directadmin/custombuild/libpng-1.2.42.tar.gz
/usr/local/include/libpng
/usr/local/include/libpng12
/usr/local/include/libpng/libpng12
/usr/local/include/libpng12/png.h
/usr/local/include/libpng12/pngconf.h
/usr/local/lib/libpng.a
/usr/local/lib/libpng.so
/usr/local/lib/libpng.so.3
/usr/local/lib/libpng.so.3.1.2.42
/usr/local/lib/libpng12.a
/usr/local/lib/libpng12.so
/usr/local/lib/libpng12.so.0
/usr/local/lib/libpng12.so.0.1.2.42
/usr/local/lib/pkgconfig/libpng.pc
/usr/local/lib/pkgconfig/libpng12.pc
/usr/local/man/man3/libpng.3
/usr/local/man/man3/libpngpf.3
/usr/share/doc/libpng-1.2.10
/usr/share/doc/libpng-1.2.10/CHANGES
/usr/share/doc/libpng-1.2.10/LICENSE
/usr/share/doc/libpng-1.2.10/README
/usr/share/doc/libpng-1.2.10/TODO
/usr/share/doc/libpng-1.2.10/example.c
/usr/share/doc/libpng-1.2.10/libpng.txt
/usr/share/man/man3/libpng.3.gz
/usr/share/man/man3/libpngpf.3.gz
/var/cache/yum/base/packages/libpng-1.2.10-7.1.el5_3.2.i386.rpm
/var/cache/yum/base/packages/libpng-devel-1.2.10-7.1.el5_3.2.i386.rpm

Would a symbolic link work to resolve the path issue?

unSpawn 03-31-2010 05:22 AM

Quote:

Originally Posted by vectro (Post 3918288)
Would a symbolic link work to resolve the path issue?

If you remain adamant doing things "the right way" doesn't apply to you then all I can say is it may or may not work. End of thread for me.

vectro 03-31-2010 08:18 PM

Then does anyone else have an idea about the right way to install libpng? Installing with yum seems to place it in the wrong directory.


All times are GMT -5. The time now is 02:10 AM.