[UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO
-
@ph34rb0t at some point I’ll throw Ubuntu on an old laptop and try to play along… sadly all my linux experience is server-side stuff, not desktop/gui stuff
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
Yes, of course I did. I even pre-mapped all axes in DeviceDefaults.txt.
I guessed you did, it was just wishful thinking about we being too focused on complex solutions while the easy one was there. Sorry
However, after unsuccessfully trying to run TARGET through WINE to combine controllers into a virtual one and not finding any suitable Linux tool to do the same, I’m giving up. After all, what good is a HOTAS if it doesn’t work?
I use joymap to merge my controllers into one for old games (A-10 Cuba! and EF2000). Drawback from this is you are limited to 18 buttons.
I use it also to “convert” my pedals into another controller when games don’t detect them but detect the HOTAS (EECH).
Documentation is really bad but, once I got it, it’s kind of easy and one-time set-up. Again, it’s late for me now but if you are interested I can do a tutorial tomorrow.This reminds me you can also use xboxdrv to convert anything into a virtual Xbox controller. I ignore if you can merge controllers with this option as I never went farther than converting my pedals with this approach. But I can explain the very basic way too.
-
This issue bugged me enough that I just could not let it go. I tried:
- Combining two devices into one with MoltenGamepad, which is like vjoy for Linux (does not work because the resulting virtual device is limited to 6 axes)
- Various WINE builds, including custom ones and Proton
- Various options
- Countless reinstalls
Then I got the idea that DirectInput may not like different devices with similarly named axes, so I searched the forum if somebody else had issues with the T16000M+TWCS combo.
Then I found this post: https://forum.falcon-bms.com/post/244992
I added the TWCS’ axes to the T.16000M stick in the 2D controller UI and…
Voilà, a fully functional flight setup with all assigned axis working.
However, it is is the most counterintuitive solution I have ever encountered in any flight simulator.
Now excuse I’m going to bang my head against the wall for an hour or three.
\
- Edit:
(Next stop: The “one POV hat” limit.)- Edit2:
POV limit fixed thanks to the lines for “Falcon BMS User.cfg” of Orffen’s T16000M+TWCS key file. -
Here’s a Bash script to install and manage BMS with a system-independent WINE runner and prefix. Rather simple, but enough to please my laziness.
Supports Falcon 4.0 from the Falcon Collection on GOG.It creates some subfolders to contain specific elements for managing a BMS installation and has a looping menu so you won’t have to restart it after every step.
Code:#! /bin/bash ###### # Version 20230211 ###### ## # Variables ## bms_ver=4.37 bms_storage="$PWD/z_downloader_installer" bms_installfolder="$PWD/BMS_$bms_ver" wine_runner="$PWD/0_wine_runner" #wine_runner="/usr" export WINEPREFIX="$PWD/0_wine_prefix" # loop=yes # ## # Functions ## function pause(){ read -p "$*" } # function checkdirectories(){ if [ ! -h "$bms_storage" ]; then mkdir "$bms_storage" echo "CREATED: $bms_storage"; fi if [ ! -h "$wine_runner" ]; then mkdir "$wine_runner" echo "CREATED: $wine_runner"; fi if [ ! -h "BMS_$bms_installfolder" ]; then mkdir "BMS_$bms_installfolder" echo "CREATED: BMS_$bms_installfolder"; fi } # function menu(){ if [ $1 == "main" ]; then clear echo "Falcon BMS $bms_ver WINE launcher" echo " " echo "Wine binary folder: $wine_runner " echo "Wine prefix: $WINEPREFIX " echo "BMS install folder: $bms_installfolder " echo " " echo "1) Falcon BMS $bms_ver" echo "2) Falcon BMS $bms_ver Launcher" echo "3) Falcon BMS $bms_ver Alternate Launcher " echo " " echo "4) Install or update Falcon BMS " echo " " echo "5) Manage WINE prefix " echo " " echo "6) Exit " echo " " echo "Choice [1-6]:" echo " " # Read choice read case; # Choices case $case in 1) "$wine_runner/bin/wine" "$bms_installfolder/Bin/x64/Falcon BMS.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_installfolder/Launcher.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_installfolder/Launcher/FalconBMS_Alternative_Launcher.exe"; loop=yes; break ;; 4) menu "install" ;; 5) menu "wine" ;; 6) break clear exit esac fi if [ $1 == "install" ]; then clear echo "Falcon BMS installation options " echo " " echo "1) Falcon 4.0 GOG Installer " echo "2) Falcon BMS Downloader " echo "3) Falcon BMS $bms_ver Installer " echo "4) Update Falcon BMS $bms_ver " echo " " echo "5) Return to main menu" echo " " echo "Choice [1-5]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" "$bms_storage/setup_falcon_4_2.0.0.1.exe"; "$wine_runner/bin/wine" "$PWD/Falcon 4.0/falcon4.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_storage/Falcon_BMS_Downloader.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_storage/Falcon BMS_${bms_ver}_Full_Setup.exe"; loop=yes; break ;; 4) "$wine_runner/bin/wine" "$bms_installfolder/Updater.exe"; loop=yes; break ;; 5) menu "main" ;; esac fi if [ $1 == "wine" ]; then clear echo "WINE prefix management " echo " " echo "1) WINE Configuration " echo "2) WINE Registry Editor " echo "3) WINE Control Panel " echo "4) WINE Uninstaller " echo "5) Winetricks " echo " " echo "6) Return to main menu" echo " " echo "Choice [1-6]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" winecfg; loop=yes; break ;; 2) "$wine_runner/bin/wine" regedit; loop=yes; break ;; 3) "$wine_runner/bin/wine" control; loop=yes; break ;; 4) "$wine_runner/bin/wine" uninstaller.exe; loop=yes; break ;; 5) winetricks; loop=yes; break ;; 6) menu "main" ;; esac fi } ## # Programs ## checkdirectories # while [ "$loop" = yes ]; do loop=no menu "main" done
Usage:-
Save the above code in a text file named “z_BMS_Manager.sh” (or any other name) and make sure to make the script executable.
-
Move the script to your intended BMS container folder (e.g. “Falcon_BMS/z_BMS_Manager.sh”) and run it to have it create all required folders.
-
Download a WINE build from the “Releases” page of the “Wine-builds” Github repository. Pick any “-amd64” package.
Unpack the downloaded archive, then move the “bin”, “lib” and “share” folders into “Falcon_BMS/0_wine_runner”. -
Download the BMS Downloader from the main website and the Falcon 4 installer from GOG.
Move both exe files into the “Falcon_BMS/z_downloader_installer” folder. -
Install Falcon 4 from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target should be the “Falcon 4.0” folder in the same folder as the install script (e.g. “Falcon_BMS/Falcon 4.0”).
If you stuck to the “Falcon 4.0” folder name, Falcon 4 will be started after the installation. Once it is at the main menu, exit F4. -
Run the Falcon BMS Downloader from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The download target for the installer should be “Falcon_BMS/z_downloader_installer”. -
Install Falcon BMS from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target for BMS should be the “Falcon_BMS/BMS_[version number]” folder. -
Run the BMS Updater from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
-
Launch BMS directly or with the standard or alternative launcher.
If you successfully ran all of the installers, chances are high that BMS will also run.
The script’s main menu will loop until you pick the “Exit” option, terminate it with CTRL+C or close the terminal window.
Notes:With this script, you theoretically have a completely portable BMS installation, as long as you make sure that the WINE drive letter of the partition that contains “Falcon_BMS” remains constant across computers.
You can also have multiple BMS releases exist side by side if you make a copy of the script, change the value of $bms_ver before installing any past or future BMS release and use the copied script to manage that BMS installation.Without any long-term experience (e.g. campaign), I found that I did not need any extra WINE configuration steps to run Falcon BMS and get into 3D.
However, I’ve installed DXVK with winetricks (which must be installed at system-level) to make sure that Direct3D calls are piped to Vulkan instead of OpenGL (faster!).
Disclaimer:
The script could have bugs or other deficiencies and I take no responsibilitiy if it does unintended things to everything and anything.
Feel free to modify it to your liking though.
Changelog:
2023/02/11 - Moved BMS installation options and WINE management options into submenus, added option to launch BMS’ exe directly -
-
So happy you made it!!
I know that feeling of non stopping until making it. Great work!
And great idea about the script.
Happy flying!
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
So happy you made it!!
I know that feeling of non stopping until making it. Great work!
Thanks. A decade of Linux usage has taught me that determination is an important asset in making this operating system work.
Happy flying!
Well, that’s still on the agenda. I need to map the buttons first and do a refresher on weapon employment.
Maybe try to get WDP to work as well as I may need key assignments and checklists as kneeboard pages. -
It’s not the OS really, but trying to get non-supported software like BMS working on it… to be fair
Once Linux works, it’ll continue to do so until the sun goes nova, hardware permitting
All the best,
Uwe
-
Got AITrack+Opentrack to work my BMS setup.
General workflow, in case anybody also wants to give AITrack and OpenTrack a try and needs pointers:-
Compile AITrack for Linux (read its readme for instructions).
-
Run AI Track and set it up for good tracking. Play around with the camera and tracker settings and make sure to tick “Use remote OpenTrack client”. IP should be 127.0.0.1 (i.e. local) and port 4242.
Leave AITrack in tracking mode. -
Compile my OpenTrack fork featuring enhanced WINE/Proton integration. Read the “build script” part of the readme for pointers regarding compilation and- more importantly - system dependencies. The compiled opentrack release in the “opentrack-install” folder can be moved to whereever you want it.
-
Launch OpenTrack and set it up with “UDP over network” with port 4242 (same as for AITrack) as input and “WINE […]” as output.
Start tracking. If AITrack is still in tracking mode and the octopus image is moving, the UDP connection works.
Stop OpenTrack’s tracking. -
In OpenTrack’s “Output” settings dialog, select “WINE” and point the “Prefix” and “Runner” paths to the prefix and WINE runner folders from my BMS Manager script setup (i.e. “[…]/Falcon_BMS/0_wine_prefix” and “[…]/Falcon_BMS/0_wine_runner”. Tick “ESync” and “FSync”, set the protocol “Both” and the Wrapper to “
opentrack-wrapper-wine.exe.so
”. -
Start tracking in OpenTrack again. This may prompt an update of the WINE prefix, meaning that WINE and the prefix were found.
Actual verification of the correct initialisation of the WINE Wrapper can be done by entering the Registry of the WINE prefix from my BMS Manager script and checking the presence of the “HKEY_CURRENT_USER\Software\Freetrack\FreeTrackClient” and “HKEY_CURRENT_USER\Software\NaturalPoint\NATURALPOINT\NPClient Location” keys. -
Set up Opentrack. It is recommended to create a profile for BMS from OpenTrack’s profile controls.
For AITrack, I found that OpenTrack’s “Hamilton” filter with large smoothing values provides the best result.
In the general options menu, assigning F12 and F11 as shortcuts for “Center” and “Toggle” will not block any significant BMS functions.
In the “Output” tab, some input axes (in my case: pitch, roll and z) may need to be inverted.
It is recommmended to enable game detection for BMS by pointing the executable to “[…]/Falcon_BMS/BMS_4.37/Bin/x64/Falcon BMS.exe” and selecting the BMS profile. This will automatically put Opentrack into “Tracking” mode whenever BMS is executed.
The rest of the setup like other options and curves is to taste. -
Start BMS from my BMS Manager script.
In the “Setup” -> “Controllers” -> “Advanced” menu, enable the TrackIR related checkboxes.
Start a Dogfight, TE or else. You should have headtracking now.
Notes:- OpenTrack tracking must always be started after BMS, otherwise it will create a WINE server which blocks BMS.
- As of today, AI Track will not start tracking automatically after it is started, so you still require a click.
- Disabling the “Enable preview” checkbox in AITrack will save some CPU cycles as the image won’t have to be rendered constantly.
- I found that a WINE runner based on the “Staging-tkg” (or “Staging” in general) release from Wine-Builds refused to cooperate with BMS and/or OpenTrack, not providing any headtracking at all. Changing the runner to the regular WINE build (also from Wine-Builds or as installed on my Linux distro) fixed this.
- By default, looking around with the mosue and coolie hat in BMS will stop working with OpenTrack’s NPClient64.dll, whether OT is running or not. This can be fixed/worked around by replacing NPClient64.dll with an older version of NPClient64.dll, for example the one sourced from here. Simply move it into the “opentrack/libexec/opentrack” fvolder and overwrite the original.
If this breaks some other games that you’re using OpenTrack with, simply make a copy of the Opentrack folder for BMS use and use that one. There is no extra effort required in making ands running a copy as all instances of OpenTrack on the system look for tracking profiles in “~/Documents/opentrack-2.3/”.
Hope this is useful. -
-
I’ve updated the BMS Manager script with submenus to declutter the main menu and also added an option that starts “Falcon BMS.exe” directly.
@hoover said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:It’s not the OS really, but trying to get non-supported software like BMS working on it… to be fair
Well, I’ve been using Arch Linux for a decade now because I like my performance improvements. Troubleshooting, while much more rare than Arch’s reputation makes it out to be, can becomme quite tiring once things start to get weird or broken.
Once Linux works, it’ll continue to do so until the sun goes nova, hardware permitting
On my system, Linux works until Windows or my backup distro decides to wipe the bootloader after an update. Reinstalling it is my flavor of the “Falcon dance” from days long past.
But yes, if left untouched, Linux lasts forever. I still have a mid-2000s laptop around for nostalgia reasons which also runs Arch. I just need to boot it once a year, perform an update and it’s good to go.
-
thanks for your work on BMS manager! I tested it yesterday to set up Falcon 4 and BMS in a test installation and that worked like a charm. I haven’t gotten around to trying BMS itself yet (I plan to use the trad. launcher), but hopefully some time over the weekend.
Cheers, Uwe
-
My last big roadblock was the annoying loss of mouse and hat look after OpenTrack was connected to BMS for the first time. I found that using an older NPCLient64.dll fixes this and added instructions to my preceding OpenTrack-related post.
I’m thinking about adding an option to start BMS and OpenTrack to BMS Manager.
Some more time was dumped into getting the controls set up. It was a bit tedious without the Alternative Launcher, but Orffen’s keyfile for the T16000M+TWCS provided a very good base. So far, I encountered zero issues with DX shifting.
Last stop before actually hitting the cockpit (I promise!): Making kneeboard pages from the keyboard and HOTAS layout files and some basic checklists because I just know that I will forget all of this again.
@hoover said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:thanks for your work on BMS manager! I tested it yesterday to set up Falcon 4 and BMS in a test installation and that worked like a charm. I haven’t gotten around to trying BMS itself yet (I plan to use the trad. launcher), but hopefully some time over the weekend.
That’s great to hear!
Mind that using the regular launcher breaks the script loop for some reason. After you exit the Launcher or BMS, the script will terminate. This does not happen with any other launch option (direct or AL) though. -
Anyone had some luck with OpenTrack 2023.1.0 and wne output? I’ve managed to compile it, but here wine wrapper process seem o crash immediately after start.
In any case please add some comments to issue #1633
https://github.com/opentrack/opentrack/issues/1633 -
@Xeno I never managed to make opentrack work with wine. It works with proton, though… So I use the windows version
-
@ph34rb0t I borked my wine prefix so I tried this and works great. Thanks for sharing!
The only “”“issue”“” I had was that, unless I did something wrong, the Install option looks for the file inside /z_downloader_installer/ but the downloader puts it in /z_downloader_installer/BMS_Downloads/
I just moved it and worked great.
As for the updates, I had to install vcrun2015 through winetricks and all worked great.Again, thank you.
-
@Xeno
Replying to myself, this issue shouldn’t affect BMS, new OT hates 32bit wine prefixes, but works perfectly fine with 64bit prefix. Kinda odd, but whatever.
Also if someone is compiling latest code from git rather than released in zip builds against never onnx runtime was fixed. It seems 1.14.1 gives some performance gain compared to 1.12.1. -
@Xeno Good to know. Will try to compiled the newest version then.
-
Hi all! I hope this is not considered necro… I think is better to keep having Linux related things in the same place.
So I always had a problem when directing opentrack to wine’s and game’s directory. I did it all apparently right but, after pressing start, even if everything seemed right, the game didn’t recognize headtracking. This happened also with other games, not just BMS.
By accident I’ve discovered that if I create a Start Profile in Options -> Game detection tab that activates when Falcon BMS.exe is active, opentrack works!
I don’t know why this can be, as through proton it works also just pressing start, but… that’s how it is for me.
-
A subforum for Linux / MAC users would be nice where we could organize all the different topics w/r to running BMS on non-windows systems.
Cheers, Uwe
-
Hi gents,
Did anybody is using new Launcher (former AL)? Are tickmarks on checkboxes visible for you? So far I was messing with themes and installing corefonts, to no avail.
Issue reported b yMunster:
https://forum.falcon-bms.com/topic/25107/linux-alternative-launcher-does-not-show-checkmarksAlso did anyone manage to run launcher with Wine mono rather than official MS .Net ?
-
@Xeno Oh! I totally missed that post… even if I’m tagged!!
I’m currently using the installation following ph34rb0t’s instructions. On that, I did not install any .net version so I guess that means I’m using mono.
As for the boxes, I do not see the tickmarks either.
Also, some options, as the ACMI recording do not get saved from one launch to the next, so I have to select it each time.