Pre-Launch Scripts
You can attach shell scripts to profiles to run before X-Plane launches. This is useful for pre-flight tasks like authenticating on ACARS networks, starting helper utilities, or mounting network drives.
Attaching Scripts to a Profile
Navigate to the Profile Scripts tab:
Click + in the scripts list and select a script file on your disk.
Make sure the script has executable permissions (
chmod +x script.sh).Toggle the script on or off for the active profile.
Environment Variables
When executing scripts before launch, X-Plane Launcher passes environment variables from three sources:
Global Variables: Configured in Settings > Script Environment. Shared across all profiles.
Profile Variables: Configured in the Profile Scripts tab. Specific to the active profile, overriding any matching global variable keys.
XLAUNCHER_PROFILE: Automatically set to the name of the active profile.
Example: Hoppie ACARS Script
Here is an example script (examples/hoppie.sh) that sends an authentication request to the Hoppie ACARS network:
#!/bin/bash
set -e
# Send POST request to Hoppie with environment variables
curl -s -d "email=${EMAIL}&logon=${HOPPIE_LOGON}&network=${NETWORK}" \
-X POST https://www.hoppie.nl/acars/system/account.html > /dev/null
Setup in X-Plane Launcher:
In Settings > Script Environment:
EMAIL=pilot@example.comHOPPIE_LOGON=YOUR_HOPPIE_CODE
In Profile Scripts (VATSIM profile):
Add
/path/to/hoppie.shNETWORK=VATSIM
In Profile Scripts (IVAO profile):
Add
/path/to/hoppie.shNETWORK=IVAO