Using Ubuntu 20.04, whenever I search for a place on Google Earth Pro in the
appropriate search field, I am redirected to the wrong location with
coordinates (0,0).
For instance, when I search for "New York, US" the pin drops
correctly on New York city, but the earth globe rotates and zooms in on a spot
in the Pacific Ocean.
After some investigation, I discovered that this problem is related to the
regional settings of the operating system. Resolving the issue requires
adjusting the LC_NUMERIC environment variable, as the discrepancy
arises from my language's use of a comma as a decimal separator, causing
confusion in Google Earth Pro. To fix this problem, follow the steps below.
Disclaimer: This tutorial is based on personal experience and is not a professional guide. Please read the LEGAL NOTES carefully. Applying these commands (especially those requiring root/administrator privileges) carries inherent risks. Any accidental data loss or system breakage is your sole responsibility.
Step 1: Make a quick test
Close Google Earth Pro, if it is open, and run the following command in a terminal:
LC_NUMERIC=C google-earth-pro
Google Earth Pro opens. Test a location. If the issue is solved, you can make this change permanent by modifying the application’s shell script. Read on to learn how.
What does the above command do?
The command launches Google Earth Pro with the
LC_NUMERIC environment variable set to C, the
standard POSIX numeric format. This ensures the application uses:
- a period (
.) as decimal separator - no thousands separator
This avoids issues caused by specific system locales (e.g.,
it_IT, which uses the comma , as the decimal
separator) and resolves formatting problems in applications like Google Earth
Pro that rely on numerical input.
Step 2: Edit the shell script to set the LC_NUMERIC
The file /opt/google/earth/pro/googleearth is a
shell script launcher for Google Earth Pro. It configures any
environment prerequisites needed by the application to run. By modifying this
script, you can customize how Google Earth Pro behaves when it starts and you
can make the LC_NUMERIC setting permanent.
Close Google Earth Pro, if it is open and edit the script with root privileges. To do this in Ubuntu open a terminal and run the following command:
sudo nano /opt/google/earth/pro/googleearth
This will open the file in the nano command-line text
editor.
Scroll to the bottom of the comment section and insert the following line
immediately after it:
export LC_NUMERIC=C
Save the changes and close the file. In nano press Ctrl + O and confirm the file name with Enter, then press Ctrl + X to exit.
Finally, open Google Earth Pro from the graphical interface launcher, which starts Google Earth Pro using the script... and Voila! It works.
Successfully tested on Ubuntu 18.04, 20.04, 22.04 LTS with Google Earth Pro
7.3.6 (64-bit).
I found that this issue also occurs on Ubuntu derivatives and other Linux distros, such as Manjaro. The variable and the file to be modified should be the same across these systems.
Let me know in the comments below if this solution works for you. Thanks!
Comments
Post a Comment