LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   all fonts destroyed for certain Ubuntu GNOME applications (https://www.linuxquestions.org/questions/linux-desktop-74/all-fonts-destroyed-for-certain-ubuntu-gnome-applications-821807/)

Greg Marks 07-23-2010 11:05 PM

all fonts destroyed for certain Ubuntu GNOME applications
 
After building pango-1.28.1 and cairo-1.8.10 from source in an unsuccessful attempt to build graveman-0.3.12-5 (due to inability to configure gtk+-2.20.1), various GNOME applications display empty boxes where text should be. I am running Ubuntu 10.04. Three screenshots to illustrate (for Rhythmbox, System->Preferences->Appearance dialogue box, and System->Preferences->Sound dialogue box) are posted at:

http://gmarks.co.cc/Screenshot-0.png
http://gmarks.co.cc/Screenshot-1.png
http://gmarks.co.cc/Screenshot-2.png

Can anyone help suggest how to fix this mess?

Greg Marks 07-24-2010 01:31 AM

Note: after reboot, problem is much worse--even affects login screen. Updated screenshot (URLs above) to reflect exacerbated problem. Any solution will have to be via command line, since I can only use the affected computer via ssh. Current problem seems similar to that described here:

http://www.linuxquestions.org/questi...e-gone-146824/

(which, disconcertingly, has not been resolved in the last six years). The packages listed there bear some similarities to those I attempted to install. In my case: gtk+-2.20.1 failed to install, pango-1.28.1 installed, atk-1.30.0 installed (in each case from source).

Laurens73 07-24-2010 03:14 AM

One thing you certainly can do is test the privileges on your fonts. Open a console window, or via ssh as you mentioned yourself.

Log in as root or sudoer there and run this bash script:

as root:
Code:

#!/bin/bash

# Making all directories available to all users:
chmod 755 /usr/share/fonts -R

# Removing the executable bit from the normal files:
cd /usr/share/fonts
find $DIRNAME -type f -exec chmod 644 {} \;

# Rebooting system:
shutdown -r now

If it is a permissions problem it should be solved then.

Good luck

Greg Marks 07-24-2010 04:07 AM

Thank you for your suggestions. A quick glance through /usr/share/fonts seems to show that all subdirectories already have 755 permissions, and all subfiles have 644 permissions. I'll give your bash script a try nevertheless. One question: do you really intend the line in the script to read "find $DIRNAME -type f -exec chmod 600 {} \;" instead of "find $DIRNAME -type f -exec chmod 644 {} \;"? These files are owned by root; don't I want them readable by all?

Greg Marks 07-24-2010 04:35 AM

I tried running that bash script as root, both as written and with "600" changed to "644"; unfortunately, the problem remains. I also tried:

Code:

sudo apt-get remove --purge gnome-desktop-environment
sudo apt-get install gnome-desktop-environment
sudo apt-get autoremove
sudo apt-get install gnome kde xfce4 wmaker gnome-dbg gnome-themes-extras gok-doc

and restarted. Nothing helped; I still have no fonts, even on the login screen.

Laurens73 07-24-2010 04:39 AM

Quote:

Originally Posted by Greg Marks (Post 4043751)
Thank you for your suggestions. A quick glance through /usr/share/fonts seems to show that all subdirectories already have 755 permissions, and all subfiles have 644 permissions. I'll give your bash script a try nevertheless. One question: do you really intend the line in the script to read "find $DIRNAME -type f -exec chmod 600 {} \;" instead of "find $DIRNAME -type f -exec chmod 644 {} \;"? These files are owned by root; don't I want them readable by all?

You are correct. These should be 644. My mistake. I'll edit it rightaway :)

Laurens73 07-24-2010 04:50 AM

Quote:

Originally Posted by Greg Marks (Post 4043765)
I tried running that bash script as root, both as written and with "600" changed to "644"; unfortunately, the problem remains. I also tried:

Code:

sudo apt-get remove --purge gnome-desktop-environment
sudo apt-get install gnome-desktop-environment
sudo apt-get autoremove
sudo apt-get install gnome kde xfce4 wmaker gnome-dbg gnome-themes-extras gok-doc

and restarted. Nothing helped; I still have no fonts, even on the login screen.

Since the new script also doesn't work you could try a more radical method:

Code:

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

After this restart your system


If even that doesn't help you can do something even more extreme: resetting your distro settings and reinstalling packages by entering the next command:

Code:

sudo apt-get dist-upgrade
Restart your system

Normally the command above is used for doing a real distro upgrade after altering the /etc/apt/sources.list file, but now it will do the same with the existing version. There is one thing: in most cases everything looks like a new install with all extra installed packages on it, but sometimes Ubuntu destroys itself during a dist-upgrade. I strongly recommend if you're considering the last option to do this in a text console only (ok, you got no other options atm, but for later problems it's a good thing to know).

Greg Marks 07-24-2010 04:59 AM

I'd prefer to be incorrect and have fonts. Sad to say, the files in the bottom-level /usr/share/fonts subdirectories all have 644 permissions now, but still no fonts.

One other interesting tidbit: Firefox and Thunderbird do not seem to start up, though Google Chrome does (but it, like everything else, displays only blank squares for fonts).

I'm not sure if this has anything to do with it, but prior to this problem configuring gtk+-2.20.1 failed with this error:

Code:

configure:24925: error:*** Can't find cairo-pdf.h. You must build Cairo with the pdf*** backend enabled.
After reading the log file, I moved the cairo-pdf.h file to /usr/local/include/pango-1.0/ and tried to configure gtk+-2.20.1 again, but it again exited with the same error. I may have attempted "make" without configuring gtk+-2.20.1 successfully. But it's hard to believe any of this could have had such a destructive effect (I did not try "make install" and did not run the ./configure or make commands as root).

Could the problem possibly have been caused by my successful build of cairo-1.8.10?

Greg Marks 07-24-2010 05:13 AM

Thank you for the additional suggestions. I tried:

Code:

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

and restarted, but the problem remained. I then tried the last resort distro upgrade, but got this output:

Code:

1$sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Is there something else I might try?

Laurens73 07-24-2010 05:17 AM

Quote:

Originally Posted by Greg Marks (Post 4043778)
Thank you for the additional suggestions. I tried:

Code:

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

and restarted, but the problem remained. I then tried the last resort distro upgrade, but got this output:

Code:

1$sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Is there something else I might try?

At this moment I think the compiled cairo package has dependency problems, see the message below:

Quote:

Originally Posted by Greg Marks (Post 4043773)
I'd prefer to be incorrect and have fonts. Sad to say, the files in the bottom-level /usr/share/fonts subdirectories all have 644 permissions now, but still no fonts.

One other interesting tidbit: Firefox and Thunderbird do not seem to start up, though Google Chrome does (but it, like everything else, displays only blank squares for fonts).

I'm not sure if this has anything to do with it, but prior to this problem configuring gtk+-2.20.1 failed with this error:

Code:

configure:24925: error:*** Can't find cairo-pdf.h. You must build Cairo with the pdf*** backend enabled.
After reading the log file, I moved the cairo-pdf.h file to /usr/local/include/pango-1.0/ and tried to configure gtk+-2.20.1 again, but it again exited with the same error. I may have attempted "make" without configuring gtk+-2.20.1 successfully. But it's hard to believe any of this could have had such a destructive effect (I did not try "make install" and did not run the ./configure or make commands as root).

Could the problem possibly have been caused by my successful build of cairo-1.8.10?

Normally when installing with apt-get all broken dependencies will be solved by apt by installing additional packages. Maybe you need to compile some extra packages / modules depending on cairo-1.8.10.

I found this info about the cairo package:
Quote:

Introduction to cairo: cairo Dependencies.

Required. libpng-1.2 .42, pixman-0.15.20, and Fontconfig-2.8.0
Maybe (re-)installing / (re-)compiling the packages above will help.


The reason Google Chrome starts up and the others don't is as far as I know that Google Chrome is self-supporting in a lot of ways.

Greg Marks 07-24-2010 02:35 PM

I installed pixman-0.15.20, libpng-1.2.42, and fontconfig-2.8.0, then ran ./configure, make, make install in cairo-1.8.10 again. I was finally able to build gtk+-2.20.1. (Both pixman-0.15.20 and gtk+-2.20.1 required ./configure and make to be run as root. Very dangerous, in my opinion, but I'm somewhat desperate at this point. I would not recommend that others try to build these packages.) For good measure, I also tried

Code:

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

again. Then rebooted. Still no fonts.

Any other ideas?

Laurens73 07-24-2010 03:27 PM

Quote:

Originally Posted by Greg Marks (Post 4044138)
I installed pixman-0.15.20, libpng-1.2.42, and fontconfig-2.8.0, then ran ./configure, make, make install in cairo-1.8.10 again. I was finally able to build gtk+-2.20.1. (Both pixman-0.15.20 and gtk+-2.20.1 required ./configure and make to be run as root. Very dangerous, in my opinion, but I'm somewhat desperate at this point. I would not recommend that others try to build these packages.) For good measure, I also tried

Code:

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

again. Then rebooted. Still no fonts.

Any other ideas?

Sorry. I haven't got a clue what it could be then. I don't know what exactly happens when compiling cairo. Perhaps (it's an act of desperacy) there are some damaged kernel modules? Maybe re-installing the linux-image packages (by searching in Synaptic all kernel modules with the search string 'linux-image' will appear) will install a new kernel. Maybe re-installing Xorg will help, cause all programs running under Xorg have the problem...

Greg Marks 07-24-2010 05:06 PM

As we all know, there is a last resort. I can reformat the drives and reinstall Ubuntu from the installation disk, copy my data back onto the computer, and then laboriously reinstall all the old software. The last step in particular promises to be onerous, so I am hoping to be able to try something else before resorting to this option.

Laurens73 07-25-2010 08:26 AM

Indeed, to get the system working again the fastest way, that would be a last option. Unfortunatly we won't find out what causes the problem and how to solve it without re-installing. I hope you've got a seperate /home partition to do a fast recovery without having to put back all your personal settings. I have been thinking about the Fontconfig package: maybe you need to run it in a particular way to setup the fonts again?

burninGpi 07-25-2010 03:06 PM

Quote:

Originally Posted by Laurens73 (Post 4044739)
I have been thinking about the Fontconfig package: maybe you need to run it in a particular way to setup the fonts again?

The command is either fc-cache -f or fc-cache -r


All times are GMT -5. The time now is 05:07 PM.