TerraSync Prefetch
TerraSync is a nice little utility included with FlightGear that downloads scenery on the fly. It works like a charm, but there's one caveat. FlightGear wants the scenery right now and TerraSync needs to download it first, therefore the first time you start FlightGear in a new area (or "teleport" there), you won't have scenery. TerraSync will be busily downloading it in the background, though, so you just restart FlightGear a minute later, et voilá! But starting FlightGear that first time is a waste of time, since it takes forever to parse its config files and do a bunch of other stuff before it even tries to get the scenery. So I wrote a little shell script to do the job quicker.
Incidentally, this is the script I use to start FlightGear. It starts TerraSync if it's not already running:
#!/bin/sh
PORT=5500
FG_HOME=$HOME/.fgfs
FG_ROOT=/usr/local/share/FlightGear
TERRASYNC_DIR=$FG_HOME/Scenery
FG_SCENERY=$TERRASYNC_DIR:$FG_ROOT/Scenery
pgrep terrasync || \
nice terrasync -p $PORT -d $TERRASYNC_DIR >> $FG_HOME/terrasync.log &
/usr/local/bin/fgfs --atlas=socket,out,1,localhost,$PORT,udp $*
2 months later:
so if i type terrasync-prefetch.sh into the command shell and start flight gear will it work? (sorry if its a noob question)
2 months later:
Yes, download it, then type: