Author Topic: [WORKAROUND] Google Earth language problem  (Read 569 times)

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2065
  • Certified Windows Hater
[WORKAROUND] Google Earth language problem
« on: July 29, 2012, 02:46:34 AM »
Probably it's not a PCLinuxOS related problem but maybe someone here has a similar problem or a workaround.
I use Greek Locale on my system and Google Earth can't display any Greek character. There is no option to change the interface language from within the program since it uses the system-wide language settings.

This is what things look like in Greek:


This is what things look like in English:


Still Greek names cannot be displayed correctly:


I tried starting Google Earth from terminal using these commands:
LANG=en_US google-earth
LANG=en_US.UTF-8 google-earth

but to no effect.

I also played with GTK style (GTK applications style customizer) trying different fonts but again nothing changed.

Any ideas?
« Last Edit: September 09, 2012, 04:57:16 AM by agmg »
For the whole world, you are someone.
For someone, you are the whole world.

Offline pclosgr

  • Full Member
  • ***
  • Posts: 100
Re: Google Earth language problem
« Reply #1 on: September 08, 2012, 03:04:03 PM »
mine is even worse!
I can't see the main bar above!
maybe
this
https://support.google.com/earth/bin/answer.py?hl=en&answer=148070
could do sth for you?
(change the fonts with the secondary set?)

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2065
  • Certified Windows Hater
Re: Google Earth language problem
« Reply #2 on: September 09, 2012, 01:17:24 AM »
After a long search through the net, I have found some workaround which works in my system. I'm putting it here hoping that this will help other users in the future.

Some general notes before everything:
1. I used the latest 2012.08 KDE image, localized to Greek language using addlocale. My kernel version is 3.2.18-pclos2.pae.bfs. I had this problem with previous versions also and maybe this problem occurs in other localizations too.
2. The problem is not PCLinuxOS specific as it happens in many other distros. This workaround is based on tips and advices from other distros' users.
http://simos.info/blog/archives/872
https://productforums.google.com/forum/#!category-topic/earth/linux/BT5kyvlwFME
3. From what I have figured, the problem mainly occurs because Google Earth uses outdated or problematic versions of certain qt libraries.

On with the workaround.  :)

1. First thing first, we need to "force" Google Earth to use system versions of the following libraries and not the ones provided by the application:
libQtCore.so.4
ibQtGui.so.4
libQtNetwork.so.4
libQtWebKit.so.4


libqtphonon.so.4 is also mentioned in Google discussion but I didn't have to do anything with it.

Go to directory /opt/google/earth/free
Type the following commands one by one (as root):

Code: [Select]
mv libQtCore.so.4 libQtCore.so.4.bak
mv libQtGui.so.4 libQtGui.so.4.bak
mv libQtNetwork.so.4 libQtNetwork.so.4.bak
mv libQtWebKit.so.4 libQtWebKit.so.4.bak
ln -s /usr/lib/libQtCore.so.4.8.2  libQtCore.so.4
ln -s /usr/lib/libQtGui.so.4.8.2  libQtGui.so.4
ln -s /usr/lib/libQtNetwork.so.4.8.2  libQtNetwork.so.4
ln -s /usr/lib/libQtWebKit.so.4.8.2  libQtWebKit.so.4

This will backup the original libraries and create links to the system ones. The versions of these libraries may be different in other systems, so check them out first.

2. The same procedure has to be followed for two other libraries: libqgif.so and libqjpeg.so, located under
/opt/google/free/plugins/imageformats

The commands are (again as root):
Code: [Select]
mv libqgif.so ligqgif.so.bak
mv libqjpeg.so ligqjpeg.so.bak
ln -s /usr/lib/qt4/plugins/imageformats/ligqgif.so libqgif.so
ln -s /usr/lib/qt4/plugins/imageformats/ligqjpeg.so libqjpeg.so

3. Finally, open synaptic and install libfreeimage3
Then create a symbolic link to this library inside /opt/google/earth/free using the following command (as root):
Code: [Select]
ln -s /usr/lib/libfreeimage.so.3 libfreeimage.so.3
Also add the following line to /opt/google/earth/free/googleearth

export LD_PRELOAD=/usr/lib/libfreeimage.so.3

just before the last line that reads LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./googleearth-bin "$@"



I must note that this final step didn't work in my case. Google Earth started, giving the following error message in console:

libpng warning: Application built with libpng-1.2.47 but running with 1.5.4

The interface was partially fixed but when I tried to view images or connect to my Google Account, the program crashed again.

I had to use a replacement file for libfreeimage.so.3 provided by some guy in the Google discussion and put it in /opt/google/earth/free

In this case, the change to /opt/google/earth/free/googleearth should be:

Code: [Select]
export LD_PRELOAD=libfreeimage.so.3
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./googleearth-bin "$@"

I'm not sure how safe is this but I couldn't get it to work with the one provided by PCLinuxOS. Maybe Google Earth needs a specific version? I don't know.

Here are two screenshots of Google Earth, the first using the native libfreeimage.so.3 and the second using the replacement one




It is obvious that the first instance is missing the icons, the buttons and the checkmarks.

I put the specific part of this discussion (along with the link to the replacement files) here, in case someone from our developers' team would like to have a look at it:

Code: [Select]
It is a long-standing problem of the Qt library Google Earth uses. If your language is not English, you cannot see any character at all.
We need to replace the Qt libraries as well as some other files to prevent segfault:

1. "Good" Qt libraries from Debain Sqeeze (version 4.6.3), including libQtCore.so.4, libQtGui.so.4, libQtNetwork.so.4, libQtWebKit.so.4, libphonon.so.4
2. Plugins folder containing libqgif.so and libqjpeg.so from Google Earth 5.2
3. libfreeimage.so.3 from another distro Maverick (version 3.13.1)

Paste all the files above into the Google Earth folder to replace the existing ones, then add a line "export LD_PRELOAD=libfreeimage.so.3" before the line "exec "./googleearth-bin" "$@"" in file googleearth.
Now you may get a clear and elegant interface.

It took me more than 5 hours to find the solution. I hope it helps

Code: [Select]
I have all the files packed.
http://goo.gl/GxLQw

Note again that I didn't have to replace ALL the files, just libfreeimage.so.3

Thanks for reading and hope this post will be useful to someone :)
« Last Edit: September 09, 2012, 05:03:38 AM by agmg »
For the whole world, you are someone.
For someone, you are the whole world.