Board index FlightGear Development New features

Simple bash script for starting up FGFS - v1.4.8 is out!

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Simple bash script for starting up FGFS - v1.4.8 is out!

Postby Quix0r » Sun Dec 06, 2009 1:09 am

Hi all,

I have developed a small and simple bash script for FGFS. It is licensed under some "public domain".

Here is the permanent download link: (Version: 1.4.8)

Code: Select all
svn co

Download and unzip it into e.g. your $HOME/bin/ directory (if you prefer not to mess your $HOME directory so much). Then follow the instructions in README and maybe read the ChangeLog file if you wish.

Please remember as of version 1.3.1 this script's interpreter is no longer /bin/sh, you need /bin/bash installed on your computer.

1.4.0 has downloaded a "branded" version of the CRJ-700 FFC (Full First Class), I have temporary removed that download from my server. Please be patient until a "de-branded" (TM by Armchair_Ace) edition has been uploaded in place of the original location. So until this message has been removed, you should set CRJ700FFC="0" in your file to continue without it.

Currently, it comes with the following key features and was tested by me with recent GIT:
- Multi-player support (call sign, my server is pre-setup for you)
- TerraSync support
- Voice output support by festival
- Support for several nice add-ons (livery for 777-200ER, CRJ700-FFC, ATC-ML and more)
- Support for ~/.fgfsrc file which got overwritten without any warning
- Support for ~/ which will be generated for first time and always re-used until you delete it. This allows you to customize the default settings without messing around with the default settings file and you can still easily upgrade!
- Support for parking positions with even spaces (but no single-quotes!) in it
- ATC/ATC2 support which results in a change of your call sign to the airport's ICAO code plus -TWR got appended
- Support for Startup/gate position
- Debugging (you need to recompile with -g -O0) and the undocumented (not in fgfs --help --verbose!) --enable-fpe switch
- Profiler support (only for developers or if you want to help them)
- Direct support for "followme" and "pushback" vehicles. Your nickname got renamed so ATCs (multi-player only) can easily spot you (and ask for your service)
- Intregration of several 3rd party add-ons/hacks, see below
- AndersG's gothenburg scenery add-on
- AndersG's ocean improvement add-on (icebergs!). The patch is applied only once, so don't remove the lock file from ~/.fgfs/!)
- AndersG's cool cockpit model view (to e.g. "ride" an ICE3 or sailboat, AI aircrafts, etc.)
- John's (statto?) very BEAUTIFUL Minneapolis scenery
- Stuart's Scotland scenery add-on
- Scenery made by statto (downloaded from my mirror)
- KCDW add-on from Student_Pilot_Noob (viewtopic.php?f=5&t=6161)
- Flight data recording and playback
- Download of missing Crash_Tender 'aircraft' from AndersG's webserver
- Atlas support will come back, I need to look into it

How to launch:
Code: Select all
$ ./

This will launch fgfs with default settings (as found in ~/, fgfs_load_local_config()), A320-211 is the aircraft, EDDF is Frankfurt am Main, Germany, parking position "A10" and multi-player options turned on. For the first startup you need to set your call sign in ~/ which is being generated automatically. So just call again after you set it and verified the settings.

How to temporary use other airplane/airport:
Code: Select all
$ ./ CRJ700 EDDK

This will launch fgfs with the CRJ-700 at EDDK (Koelln/Cologne Bonn Airport).

How to update:
Simply download the above archive, extract it overwrite all files.

Test system:
- Debian Unstable (squeeze/sid) with recent packages
- Bash (Burn-again shell)
- FGFS GIT (updated this day)

When I started playing with FlightGear, I had no knowledge about ~/.fgfsrc and how to add parameters to it. So I decided the command-line parameter approach. But writing all parameters all over the time I startup FlightGear can be a very annoying thing. So I decided to start writing which is now available for "PD" (Public Domain) download. As you can see on the ChangeLog below, there have been many things changed and improved. At the beginning, this script was really "silly", all options were hard-coded into the script and there was no support of flushing them to ~/.fgfsrc. Now with that support added, my script may looks like obsoleted, but it can be still a neat launcher helper, in case you don't mind Linux terminal windows (I use FVWM-Crystal and xterm, by the way).

Still there is a lot work needs to be done, like support for COM/NAV radios and maybe some "dialog" (to configure FlightGear through a menu system). Or how about downloading flight plans from my server (please read the warning!), all these needs time to add. So please be patient and wait out for a new version coming out. :)

- Fixed ATI viewport support

- Simple & was not correct :(
- Added support for ATI viewport hack (only required for ATI cards)

- Fixed some && (double) to & (single) as 'test' supports them, too (I try to
get rid of 'test' program as it always forks another process)
- Fixed 'and' as it is invalid

- Fixed a lot for latest FGFS/master changes

- Fixed path to (was:
- Added Rembrandt option (only master switch, more may follow as requested)
- Disabled AndersG's ocean patch (due to missing materials.xml in fgdata)

- Added ATC_MODE (don't touch this) added which currently bypasses the startup
position check (which is not required for ATCs). Please leave this at "0" by
- Support for materials-dds.xml added (improved NG textures)
- Support for Kamchatka scenery add-on added
- Support for Minneapolis scenery added
- Several typos fixed, minor improvements

- Support for texture filtering added. The current default value is 16 which
is the maximum level for most 3D cards. If this is to much for your hardware
you might want to lower this value in your ~/
- In QUALITY_SPEED="speed" the texture filtering level is set to zero

- Added support for AndersG's KNTK groundnet file
- Narendran95's CRJ700-FFC add-on was a branded edition which is now disabled
by default. The download itself is currently removed but may return.
- Support added for permanently enabled jetways. Please remember that they may
drain your FPS and flight experience. For the future, I hope for a better
solution. :)
- AndersG's crash tender, pyromaniac hack, ESGP groundnet and Gothenburg custom
scenery are now mirrored on my server

- Every failed "cd" command will now call fgfs_shutdown()
- UFOs ("ufo") can now start without parking positions (they are invisble)
- Support added for Narendran95's CRJ700-FFC add-on
- Support added for Kuwait Airways livery (777-200ER)
- Support added for jomo's ATC-ML (multi-lingual ATC)

- Removed my (sorry!)
- Some minor output fixes
- Creation of lock files is now encapsulated
- Fullscreen can now be configured
- Fixed an error which causes the scenery not be displayed in single-player mode ("offline" mode)
- Enabled AI_MODELS. This will only affect single-player, in multi-player it is always enabled.

- Introduced function fgfs_output() to output a message
- Fix for followme/pullback (you need to extend/reset your!)

- Obsolete warning about parking positions with spaces removed because they are now fully supported
- Added support for Carl Vinson aircraft carrier (temporary nickname change)
- Nicknames for pushback/followme shortened to make them fit

- Support for runway startup position added. On a busy and ATC-controlled airport you should use a parking position instead. Please add the variable RUNWAY to your if you are going to upgrade.

- Encapsulated adding parameter to PARAMETERS (for upcoming rewrite to an array). This now finally allows parking positions with spaces in their names
- AI traffic and random objects can now be configured but are turned off for multi-player because other players won't see your local AI traffic/random objects and it does drain to much FPS.
- Support for ~/ where you can customize things added
- Support for 'eisenhower' "aircraft" added
- Fixed typo in 'fgds_remove' which should be 'fgfs_remove'

- Refacturing: Moved some code from to
- Even more refacturings, e.g. 'test' replaced with ${TEST_BIN}
- Introduced experimental function fgfs_unpack()
- Refactured the if/elif() block for quality/speed into a 'case' block
- Introduced function fgfs_unpack() to uncompress all types of archives (which we support: tar.gz, tar.bz2, zip)
- Introduced function fgfs_mkdir() to created directories (a little encapsulation)
- Refactured the if/elif() block for renaming the call sign depending on aircraft type and moved it to a function fgfs_detect_special_aircraft()
- Even more "encapsulation functions" introduced
- Renamed TEST variables to BIN_PID which hold a PID
- More programs are now detected by 'which' to got a nice FQFN back
- Fixed some names of archives and variables
- Removed duplicate FGFS_BASEDIR, because FG_ROOT is there

- Never released

- Parking positions with same name resulted in previous versions with a failed lookup in the corresponding AI/Aiports/${AIPORT}/parking.xml file which is now addressed with the new parameter PARKING_NUMBER
- Still, parking positions with spaces in names are NOT supported!
- All options in ${OPTIONS} got now flushed to ~/.fgfsrc

- Fixed move paths for Brest/Paris
- Added a fgfs_remove call for above textures to prevent an error
- Fixed paths in materials.xml patch, you need to patch it yourself or re-install the patch by reverting my patch's changes to materials.xml and removing ~/.fgfs/brest-paris-patch.lock. Then you can restart
- Improved some error messages and notes

- Added support for helijah's Brest/Paris high-resolution textures and a required patch

- Added support for statto's extra scenery: Rio De Janeiro. London and Washington DC are currently disabled because they seem to override some files which leads to missing objects in e.g. EGKK

- Added support for parking positions (get the name from parking.xml, e.g. A10 for first gate at EDDF)
- Verification of parking position added, if no AI/Aiport/${AIRPORT}/parking.xml is found, the simulation will launch, but without a parking position
- Added support for other fgcom server than the default

- Fix for wrong variable AICRAFT (should be AIRCRAFT) which hinders the script to change callsign for pushback and followme vehicles
- Added support for ATC/ATC2 which results in a change of the callsign to the airport's ICAO code + -TWR suffix

- helijah's scenery for LFLX added (and mirrored on my server)
- Rewritten wget to our fgfs_download() wrapper function. This function does currently only support wget, but is kept easy to understand. So everyone can add another one.
- Wrapper function fgfs_remove() added
- Added ability to disable Gothenburg and Scotland extra sceneries (if needed)
- Added ability to disable crash tender download
- Base names for many scenery is now easily configurable
- Fixed AI scenery, the wrong variable was used :(
- Added ESGP groundnet support which was made by AndersG
- Added new paramter TIME_OF_DAY which allows to set the simulation time
- Added ability to disable splash screen (if you dislike them)
- Rewritten
- Removed out-dated default settings from README file

- Some minor improvements here and there
- Copyright header updated (still public domain)

- Out-dated 'build' removed, it was suitable for an already out-dated build environment of mine
- Local gaming can now be forced by command-line options, use the word 'local' as first or third parameter
- Added handling of invalid QUALITY_SPEED settings

- Added support for debug/optimized binary
- Added option to switch between high-quality settings (they consume around 15-20 FPS) and low-quality settings
- The debug binary will only be searched for and called if DEBUGGER is set to 1
- Some parts rewritten or messages added

- Added support for pushback and followme vehicles (your nickname got renamed so you can be easily identified by an ATC)
- Support for valgrind added
- variables GDBxxx are now know as DEBUGGERxxx to make them read more generic ;)

- AndersG's "pyromaniac cheat" added (auto-download)
- A lot minor improvements/fixes I cannot recall

- Fixes a bug in loading KCDW scenery, first custom scenery, then general.

- Improve documentation/website ( )
- Document all command-line parameters (none is documented)
- Maybe some documentation on ~/ options?
- Support for setting radio frequencies?
- Anything else?

Any suggestions or comments are welcome. If you want to see your improved scenery be included with my script or need some webspace (rapidshare is good fo the start but they doesn't support script download) I can offer you some free space. :) Please also report if you cannot run it on other shells and/or OSes. Thank you. :)
Last edited by Quix0r on Fri May 17, 2013 10:26 am, edited 24 times in total.
Admin of mpserver08: running latest GIT version: v0.11.8 - User:Quix0r
Posts: 104
Joined: Tue Sep 22, 2009 8:49 pm
Location: Krefeld
Callsign: D-Quix0r
Version: next
OS: Debian

Re: Simple bash script for starting up FGFS - v1.3.0 is out!

Postby Quix0r » Fri Apr 08, 2011 9:04 pm

For those who haven't noticed: 1.3.0 with TONS of features and improvements (compared to initial release 1.0.1) is out! Hope it is okay to push this topic. :)
Admin of mpserver08: running latest GIT version: v0.11.8 - User:Quix0r
Posts: 104
Joined: Tue Sep 22, 2009 8:49 pm
Location: Krefeld
Callsign: D-Quix0r
Version: next
OS: Debian

Re: Simple bash script for starting up FGFS - v1.4.0 is out!

Postby Quix0r » Sat Jul 02, 2011 7:54 am

Sorry for the long delay and no response on chat. Skyop told me about an unwritten law (now it is a little written) that airplanes with VA stuff are not included in official and should not be included in semi-official downloads and he asked me to not support any VA in my script (if I'm correct). So I just followed his advices to keep FGFS (my script is not officially included, but semi-official) free of advertising for specific VAs and I hope you can understand me.

I can try to find a way to include your edition, but (and I think they will come) if other VAs show up, they would ask me the same to include their edition as well. This may lead to conflicting edits and patches which will make my script hard to maintain.

What FGFS needs is a better support for VA-branded airplanes, similar approached as with the liveries. If there is a really generic way to support (and as the user decided) to fully switch to blanked ("de-branded"; TM goes to Aimchair_Ace for this word) airplanes (like the CRJ700-family can be switched to) then I think this solution is warmly welcomed with every developer. :)

So, for now I will keep FFC support disabled (sorry to you) as long as there is no generic solution available.

To come back to topic, I'm thinking of supporting VA-branded airplanes but currently I have no idea how to do it. Simply adding the download and extraction part is not that what I want. The sole purpose of this script is to keep (complex) things easy and I think it is not easy for a user to solve conflicts between two different brands of the same airplane.
Admin of mpserver08: running latest GIT version: v0.11.8 - User:Quix0r
Posts: 104
Joined: Tue Sep 22, 2009 8:49 pm
Location: Krefeld
Callsign: D-Quix0r
Version: next
OS: Debian

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest