Welcome to the Linux Foundation Forum!

PNG files not recognized in GNOME in Centos 5.4

Guys you are my last resort, I've posted that on few forums but there were no response. Any ideas?

I am running CentOS 5.4 and the following error started out of the blue:

COULDN'T RECOGNIZE THE IMAGE FILE FORMAT FOR THE FILE '/USR/SHARE/GDM/THEMES/TREEFLOWER/BACKGROUND.PNG

THERE WAS AN ERROR LOADING THE THEME AND THE DEFAULT THEME COULD NOT BE LOADED. ATEMPTING TO START THE STANDARD GREETER.

If I choose GNOME and login I get more errors (for every icon I guess) saying:

COULD NOT LOAD ICON. UNRECOGNIZED FILE FORMAT.

Desktop then loads but there is no background image (other backgrounds don't work either) and instead off the icons there are question marks. All the menus and programs work normally.

KDE on the other hand works normally with all visuals, so I assume there must be something wrong with GNOME PNG library or something, maybe GNOME corruption. If I make another user it's the same story.

I mostly use the machine for web hosting (Xammp for Linux), however I made some other customizations. Is there a way to reinstall (repair) Centos to keep all the settings and folders?

THX

Comments

  • I checked if I can open the file(s) that supposedly cannot be recognized and I actually CAN open all the PNG's. Like I said, if I choose KDE as GUI the desktop shows all the graphic. But this first error actually shows before the login window (the window where you can choose user for login and type of GUI) so the problem must be in Centos SHELL (X, nautilus), not GNOME. Sorry for inacurate terms.
  • mfillpot
    mfillpot Posts: 2,177
    To me it sounds like whatever libraries that GDM or gnome is attempting to use are having problems reading the png formats. if you can start from the shell, open multiple sessions, start one session to the GUI, then move to the other session then you can run lsof and ps -A to track running apps and files at the time of the error to track it back to the source.
  • @mfillpot

    Thanks for the quick reply. I am afraid I am not so advanced in Linux to do many stunts :) If I understood you correctly you want me to run two sessions one with GUI, one with console. The problem is that the error occurs before the login window (where I can choose the type of session) and I think that CentOS doesn't allow multiple sessions out of the box:

    http://www.linuxhomenetworking.com/forums/showthread.php/19413-Centos-5-4-need-multi-user-gui-%28Gnome-or-KDE%29

    I can post screenshots of the error later if it will help.
  • mfillpot
    mfillpot Posts: 2,177
    The screenshots will help.

    Per my understanding all Linux distros are capable of running multiple sessions. I will install centos in a VM tonight to asses the capabilities and see if I can give you a step by step for this issue. What version of centos are you using?
  • I am really grateful for your effort and anything that you'll be able to dig out will be of help. Will post the screenshots in two hours when I get home.

    I am running Centos 5.4 x86_64 >>> http://isoredirect.centos.org/centos/5/isos/x86_64/
  • I posted the video of the whole bootup on the following link:
    http://www.youtube.com/watch?v=hVSMM-132R0
    

    1. At 1:29 I get the following error:

    COULDN'T RECOGNIZE THE IMAGE FILE FORMAT FOR THE FILE '/USR/SHARE/GDM/THEMES/TREEFLOWER/BACKGROUND.PNG

    which is immediately followed by:

    THERE WAS AN ERROR LOADING THE THEME AND THE DEFAULT THEME COULD NOT BE LOADED. ATEMPTING TO START THE STANDARD GREETER.

    2. At 1:43 a login windows appear where you choose the user and the type of logon (terminal, KDE, GNOME) Default is GNOME


    3. At 2:13 GNOME Loads with no background, question marks for icons in the upper taskbar, and improper icons on the desktop.

    4. At 2:30 I Log out of GNOME

    5. At 2:34 when the white X appears, the system freezes until I move the mouse (I don't know what caused that either)

    6. At 2:44 The errors from step 1 reappear

    7. At 2:50 This time I choose KDE as GUI
    and everything works like it used to in GNOME

    8. At 3:38 I logout again, the system freezes until I move the mouse, then I get the same errors from step 1

    That's all. I apologize for the crappy video and no talking.
    33.jpg 46.4K
  • This is how the desktop shouldn't look like:
    11.jpg
    11.jpg 54.7K
  • mfillpot
    mfillpot Posts: 2,177
    Sorry for the delay, it took a while to download the 64-bit iso for installation, I am installing it now.

    I don't know how comfortable you are with Linux based systems, but have you looked at the log files to see if anything was noted about this problem?
  • mfillpot
    mfillpot Posts: 2,177
    To start off, I haven't seen an OS start as slow as centos since win 95.

    Here is a way to see if you can get the error indicator from the X11 session.

    1. open a terminal
    2. type "su -" in the terminal, this will ask for your root password, this logs you in as the root user in the terminal.
    3. type "init 3", this will reboot the system in multi-user cli mode.
    4. log in as root or a normal user, it does't matter.
    5. type "startx", to boot a GUI
    6. as long as the errors populated you can then log out of the gui.
    7. after it closes you will see the error and action messages from your gui session on the screen, most likely you will see a reference to whatever failed.
  • mfillpot wrote:
    Sorry for the delay, it took a while to download the 64-bit iso for installation, I am installing it now.
    No problem, it's you who are doing me a favor.
    I don't know how comfortable you are with Linux based systems, but have you looked at the log files to see if anything was noted about this problem?
    I must admit that I didn't check the logs but I will know where to look for them. Otherwise I belong to group of Linux users who can comfortably live with Linux instead of Windows, however I don't know the shell commands off hand :)
  • mfillpot wrote:
    To start off, I haven't seen an OS start as slow as centos since win 95.
    I am glad you like it already ;) If you are wondering - the machine is a new dual core duron around 2GHZ, with 1GB of RAM with 2 WD320 HDisks in software raid. Not ideal but it's doing the trick.

    I will try to look in the logs (any logs that I should pay a special attention to) and try what you suggested in terminal and will get back to you after 4pm. My Timezone is GMT+1. Thanks for the info
  • mfillpot
    mfillpot Posts: 2,177
    In my instance of Virtualbox no OS has taken more than 25 seconds to boot in the past several year, but Centos took ~2 minutes that is insane for a modern distro. The slow boot issue isn't your computer it's some level in the boot process that I have not fully evaluated.

    for reviewing the log files, the centos log file names aren't quite what I am used to but we can work around that, once you have su'ed into root mode you can enter the /var/log/messages directory by typing "cd /var/log/message" and review and of the files by typing "less {filename}". If you find a partial message from a program but don't know what log file to look at you can search the contents of all flies, lets say you want to search the logs for an error message that contains the work icon, you can type "grep -ri icon *", this tells the system to search all files in the current folder and the sub-folders for any file that contains the word icon in any case pattern, once you find something that matches you content you want you will see the filename on the left with a ":" between the filename and the message, you will then know what file to review with less.
  • This thing must be cursed. I checked all the log files (with your method and manually) and there's no frick'n error. I will post the messages log later. I also tried the procedure that you posted earlier, but when I put 'init 3' in the terminal the system's UI hangs - white x on black background. Everything still works in the background, but if I want to do anything a hard reset is required. Any other ideas?
  • mfillpot
    mfillpot Posts: 2,177
    With it hanging it definitely sounds like corrupt x11 files. You can try to re-install the gnome and xorg components, or to be safe you can reinstall the entire Os so you will overwrite all present files.
  • OK. I am psychologically preparing for having to reinstall the system (the easy way out :side: ) But before I do that I have a few questions:

    Is there a way to reinstall this distro so it keeps the settings and config files? I mainly use this box as a web server - I use xampp for linux which I am very familiar with - so migration won't be a problem. I am more concerned about other customizations I made for I don't want to do anything from scratch. Next time I will make sure I will have everything backuped.
    Can you please give me proper command for reinstalling xorg and gnome, so everything is by the book.

    I guess it's wise to prepare a backup machine (or VM) and move my homepages to keep them online, before I reinatall. I read the article about P2V virtualization of existing machine - but it seems too complicated?

    Last thing. I chose Centos because it's community version of redhat enterprise server with all its functionalities. Like I said I use the box mostly for the web hosting which can be done withy any linux distro, but I like to try to do the same things like I do e.g. with WIN2K3 server. So what is your opinion the best server (enterprise) edition linux based alternative to Win2K3, that has all services already bundled (without having to install additional packages), KDE and GNOME GUIs and is suitable for user like me (can customize config files, knows the file structure of linux, use the software, install and configure the software, mostly uses GUI but not totally unfamiliar with the terminal but not knowing how to troubleshoot and administer linux system YET:)

    Thanks for your time and great support by the way.
  • mfillpot
    mfillpot Posts: 2,177
    You should back up your config files (usually stored in /etc/) to a remove system or external storage and then copy them onto the new installation over the "fresh" confiuration files.

    I do not use centos so I cannot recommend the best ways to re-install gnome and xorg, but a short google search should point you to cases were others have done the same.

    I generally stay away from enterprise editions of Linux distros because of the modifications done by the companies, in my research I have found many new vulnerabilities that have been introduced by their modifications that are distro dependent. If I were to push a public http server I would use the base install of openbsd with only apache installed, this would be a cli only system and non-linux based, but the security history with openbsd it seems to me to be the best fit for a high traffic machine like that. But for a Linux-based web-server I think that with your experience Ubuntu server would be a good fit because it is lighter-weight than traditional ubuntu and has additional security enhancements and a nice setup system that can setup a LAMP server by only choosing a single option.

Categories

Upcoming Training