-
Fixing some GoogleEarth 5 problems on Ubuntu 9.04
Posté le 7th juillet 2009 5 commentairesGE has at least two huge problems on Ubuntu platforms. One of them only affect certain locales.
The first problem : the font used for menus. It can be really unreadable or messed up depending on you XOrg DPI settings, and can get worse with your locale too.
Since GE is a Qt4 application you can fix this by changing Qt4 settings.
Start qtsettings-qt4 (sudo apt-get install qt4-qtconfig if you don’t have it), and change point size of the selected font to 12 or more. This fixes the problem (at least for me).While you’re at it, change the used font from « Sans Uralic » to something more complete (like « FreeSans »), which displays non-english characters *much* better.
The second problem is a real pain : when you have a locale that uses a comma (« , ») as the decimal separator, any Placemarks (or anything that has coordinates) will be saved with commas instead of dots. Indeed, the KML format only uses decimal coordinates, not HMS style, so whatever settings you use in GE options, this will affect you.
For instance, if you create a placemark at lon : 1.624801627833013, lat : 47.64969184876774, it will be saved in your ~/.googleearth/myplaces.kml as :
1,624801627833013,47,64969184876774,0(instead of <coordinates>1.624801627833013,47.64969184876774,0</coordinates>).
When you’ll restart GE, it will try reinterpret the wrong entry as :
1,180,47leaving you with a placemark really way off…
To fix this, you have to start GE with an english locale.
for instance, you can change the GE script /usr/bin/googleearth (which is a bash script), and add this below the line with export in it :export LC_ALL=C
export LANG=CAs a side effect, this will make GE show all menus in english. You can fix this in the Tools/Options/General menu and select your language. to fix this (thanks smatiauda for suggestion).
In the modified /usr/bin/googleearth script, you can also add :
cp ~/.googleearth/myplaces.kml ~/.googleearth/myplaces.`date +%Y%m%d%H%M`.bakso it will make a backup of your myplaces.kml before GE is started.
When you’ll update GE, and forget about changing startup script, you’ll at least have a valid backup of your myplaces.kml.There is a third annoying problem I could not fix yet : copy/paste from linux app to GE works fine, until you copy something in GE : the copy buffer in GE will never change to something copyed from another app (while still working fine in GE). Very painful when you copy past coordinates from anoter application.
-
File copy snippets
Posté le 27th septembre 2008 Pas de commentairesUseful file copy snippets collection for systems administration. scp is not here : syntax is trivial, and scp is really slow. The snippets below are supposed to be much faster, especially when dealing with many small files.
netcat style
- On sender :
cd to the top dir to be copied recursively, and :
tar cv . | nc -vq 10 -l -p 1234- On receiver :
cd to the dir where the content has to be copied, and :
nc -v sender 1234 | tar xf -ssh style
- Data is remote, copy to where I am now :
ssh user@source "cd /source/dir; tar cv ." | tar x- Data is in current directory, copy to remote server :
tar cv . | ssh user@destination "cd /dest/dir; tar x"rsync+ssh style
- Data is in current directory, copy to remote server :
rsync -ve ssh -ar . user@destination:/dest/dir/Note : add ‘z’ to tar options if link is slow
-
Video snippets
Posté le 27th septembre 2008 Pas de commentairesFew usefull video snippets.
Grabbing from DV cam, autosplitting scenes :
dvgrab -- autosplit -timestamp –format=dv2 videoDeinterlacing :
ffmpeg -i in-dv.avi -deinterlace -vcodec huffyuv -pix_fmt yuv422p -target pal-dvd out.aviFlv encoding :
ffmpeg -i input.avi -ar 22050 -ab 64 -aspect 4:3 -b 768k -pass 1 -f flv -s 640x480 -acodec mp3 output.flvthen again with
-pass 2.
Another solution :
mencoder out.avi -o out.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

