This guide describes the installation of F-22: Air Dominance Fighter (Steam) for use with ControllerBuddy on Linux via the Proton compatibility layer.
What you get with this setup:
- An installation of F-22: Air Dominance Fighter that is nicely integrated into your Steam library.
- ControllerBuddy will start automatically when you start the game, load the correct profile, and exit when you quit the game.
- Steam (distribution package)
- protontricks Flatpak
- ControllerBuddy Flatpak
- F-22: Air Dominance Fighter Steam Release
Important
Before starting with the steps, make sure to read the Important Notes section in the README of this repository.
-
Download F-22: Air Dominance Fighter in Steam.
-
Select Proton 10.0-4 as compatibility tool.
-
Launch and immediately exit F-22: Air Dominance Fighter so that the Proton prefix gets created.
-
Export the
APP_IDenvironment variable:export APP_ID=3146140
Important
All subsequent commands must be executed within the same shell session to retain the APP_ID environment variable.
- Install directplay and powershell into the Proton prefix:
flatpak run com.github.Matoking.protontricks "$APP_ID" directplay powershell
Important
If you are running the game on a Steam Deck, you can skip the remaining steps of this section, and instead follow the instructions in the Steam Deck Specifics section below to set up a special launch script and ControllerBuddy layout for the Steam Deck.
-
Make sure your game controller is still connected.
-
Launch ControllerBuddy, and start local run mode to initialize the UINPUT joystick device:
flatpak run de.bwravencl.ControllerBuddy -autostart local &
-
Configure F-22: Air Dominance Fighter to work with the ControllerBuddy-Profiles:
controller_buddy_profiles_dir=$(realpath -s "$(flatpak info -l de.bwravencl.ControllerBuddy)/../active/files/share/ControllerBuddy-Profiles") && cd "$controller_buddy_profiles_dir/configs/F-22_ADF" && WINEDEBUG='-all' flatpak run --filesystem="$controller_buddy_profiles_dir" com.github.Matoking.protontricks -c 'wine pwsh Configure.ps1' "$APP_ID"
-
Update the F-22: Air Dominance Fighter Steam shortcut as follows:
LAUNCH OPTIONS:
"${STEAM_RUNTIME}"/scripts/switch-runtime.sh --runtime='' -- flatpak run de.bwravencl.ControllerBuddy -autostart local -profile /app/share/ControllerBuddy-Profiles/F-22_ADF.json -tray & timeout=15; timeout "$timeout" bash -c 'until grep -q "ControllerBuddy Joystick" /proc/bus/input/devices ; do sleep 1 ; done' && %command% || { [ $? -eq 124 ] && zenity --error --text="Launch aborted because ControllerBuddy wasn't ready within $timeout seconds.\n\nCheck if your controller is connected." --width 500 ; } ; killall -q ControllerBuddy
The configuration script must be run again whenever the ControllerBuddy-Profiles receive an update.
-
Make sure your game controller is connected.
-
Execute the following command (steps 4, 7, and 8 combined):
export APP_ID=3146140 flatpak run de.bwravencl.ControllerBuddy -autostart local & controller_buddy_profiles_dir=$(realpath -s "$(flatpak info -l de.bwravencl.ControllerBuddy)/../active/files/share/ControllerBuddy-Profiles") && cd "$controller_buddy_profiles_dir/configs/F-22_ADF" && WINEDEBUG='-all' flatpak run --filesystem="$controller_buddy_profiles_dir" com.github.Matoking.protontricks -c 'wine pwsh Configure.ps1' "$APP_ID"
On the Steam Deck, a custom launch script is required to run ControllerBuddy alongside F-22: Air Dominance Fighter, since the configuration script needs to be run within the Steam Runtime environment to correctly determine the UUID of the ControllerBuddy UINPUT joystick device.
-
Create the
F-22_ADF.shlaunch script in your home directory:cat << 'EOF' > "$HOME/F-22_ADF.sh" && chmod +x "$HOME/F-22_ADF.sh" #!/bin/bash SteamAppId=3146140 game_dir="$HOME/.local/share/Steam/steamapps/common/F22ADF" exe_file=adfusa.exe proton_version='Proton 10.0' cb_profile=F-22_ADF.json export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/root/" export STEAM_COMPAT_DATA_PATH="$HOME/.local/share/Steam/steamapps/compatdata/$SteamAppId" flatpak run de.bwravencl.ControllerBuddy -autostart local -profile "/app/share/ControllerBuddy-Profiles/$cb_profile" -tray & trap 'killall -q ControllerBuddy' EXIT timeout=15 cb_device_name="ControllerBuddy Joystick" i=0 while ! grep -q "$cb_device_name" /proc/bus/input/devices do if ! pgrep -f 'flatpak-spawn --host /bin/bash -c FLATPAK_ID=de.bwravencl.ControllerBuddy' > /dev/null then (( i++ )) if [ "$i" -ge "$timeout" ] then zenity --error --text="Launch aborted because $cb_device_name wasn't ready within $timeout seconds.\n\nCheck if your controller is connected." --width 500 exit 1 fi fi sleep 1 done controller_buddy_profiles_dir=$(realpath -s "$(flatpak info -l de.bwravencl.ControllerBuddy)/../active/files/share/ControllerBuddy-Profiles") && cd "$controller_buddy_profiles_dir/configs" && "$HOME/.local/share/Steam/ubuntu12_32/steam-launch-wrapper" -- \ "$HOME/.local/share/Steam/ubuntu12_32/reaper" SteamLaunch AppId="$SteamAppId" -- \ "$HOME/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point" --verb=waitforexitandrun -- \ "$HOME/.local/share/Steam/steamapps/common/$proton_version/proton" waitforexitandrun \ pwsh F-22_ADF\\Configure.ps1 && cd "$game_dir" && "$HOME/.local/share/Steam/ubuntu12_32/steam-launch-wrapper" -- \ "$HOME/.local/share/Steam/ubuntu12_32/reaper" SteamLaunch AppId="$SteamAppId" -- \ "$HOME/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point" --verb=waitforexitandrun -- \ "$HOME/.local/share/Steam/steamapps/common/$proton_version/proton" waitforexitandrun \ "$game_dir/$exe_file" EOF
-
Add the
F-22_ADF.shlaunch script as a Non-Steam game to your Steam library. -
Rename the F-22_ADF.sh Steam shortcut to F-22: Air Dominance Fighter (ControllerBuddy).
Important
Since the Steam Deck's controller hardware is exposed to games via Steam Input, even if you do not care for the touchpad controls, you must at least apply the default Steam Input layout called Gamepad With Camera Controls to the F-22: Air Dominance Fighter (ControllerBuddy) shortcut to ensure the controller can be detected by ControllerBuddy.
There is a special ControllerBuddy Steam Input controller layout available which configures the Steam Deck's touchpads to act as a mouse replacement.
| Control | Function |
|---|---|
| Right Touchpad | Move mouse cursor |
| Right Touchpad Click | Left mouse button |
| Left Touchpad Click | Right mouse button |
| Left Touchpad Y-Axis | Scroll up/down |
To use this layout:
-
Add the ControllerBuddy Steam Input layout to your Steam controller layouts:
xdg-open steam://controllerconfig/3259858387/3672925155
-
Apply the ControllerBuddy layout to the F-22: Air Dominance Fighter (ControllerBuddy) shortcut in your Steam library.