A not so New Hope for Linux

Post Reply
fwfa
Posts: 5
Joined: Sat Jul 27, 2024 5:59 am

A not so New Hope for Linux

Post by fwfa »

I compiled the following from several threads on the issue tracker at linuxtrack'ers github and some success...here are the steps I took to get it running on my distro.

All the highlighted code below is to be copied and entered into your own linux terminal

Code: Select all

mkdir -p $HOME/Code

Code: Select all

cd $HOME/Code/

Code: Select all

sudo dpkg --add-architecture i386

Code: Select all

cat /etc/os-release
Make a note of your distribution name:
Look for the line with either UBUNTU_CODENAME or VERSION_CODENAME. If both are present, use the name after UBUNTU_CODENAME.
*****info for the above if you need to know https://gitlab.winehq.org/wine/wine/-/w ... ian-Ubuntu

Code: Select all

sudo mkdir -pm755 /etc/apt/keyrings

Code: Select all

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
My distro is MX Linux 23.3 = Bookworm Debian 12

Code: Select all

`sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources`

Code: Select all

sudo apt update

Code: Select all

sudo apt install --install-recommends -y winehq-devel wine-devel-dev git checkinstall build-essential automake bison gawk flex gcc-multilib g++-multilib gobjc gobjc++ libmxml-dev libssl-dev libusb-1.0-0-dev libcwiid-dev libopencv-dev libv4l-dev libqt5opengl5-dev libqt5webkit5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools nsis
*****For me in the list above the libopencv-dev was a deal killer but my distro already had some opencv libraries so I moved on as I believe it has to do with face tracking support and I would not be using that with my trackir. I also added qt6-dev and qt6-dev-tools to the list as some of the linuxtrack repositories are moving towards qt6 and I added it just in case.

Choose a repo to try...I ran through the list below one repo at a time...downloading and then working through each of the steps shown below all the way until the last step where you run the gui "$HOME/linuxtrack/bin/ltr_gui" if at that point I received an error I backed up to this point and downloaded and tried the next repo. I did this 4 times in my tries and the 4th one worked.
git clone https://github.com/exuvo/linuxtrack.git Failed
git clone https://github.com/rfvizarra/linuxtrack Failed
git clone https://github.com/BarronKane/linuxtrack-qt6 Failed

Code: Select all

git clone https://github.com/RavenX8/linuxtrack

Code: Select all

cd linuxtrack/
******DEPENDING on which linuxtrack repo you choose you may need to add the following
modify the file ltr_srv_master.cpp and adding #include <pthread.h> as first line. The file is located in the $Home/Code/linuxtrack/src/ folder if you used the steps above
******Once modified or confirmed continue with the below

Code: Select all

aclocal

Code: Select all

autoupdate

Code: Select all

autoconf

Code: Select all

automake

Code: Select all

./configure --prefix=$HOME/linuxtrack --with-wine-libs=-L/opt/wine-devel/bin

Code: Select all

make -j

Code: Select all

sudo make install

Code: Select all

sudo cp $HOME/linuxtrack/share/linuxtrack/99-TIR.rules /lib/udev/rules.d
reboot

Plug in your Trackir device and enter this in your terminal

Code: Select all

$HOME/linuxtrack/bin/ltr_gui
If you have your device plugged in it should say it found device # and launch the gui





I was able to get Linuxtrack up and running in Falcon 4 using the builtin #HOME/linuxtrack/share/linuxtrack/linuxtrack-wine.exe included when you install Linuxtrack.

I had a lot of back and forth steps trying to figure it out so hopefully the steps below help out..

**Install the Trackir firmware**, if you have not already. Steps to complete this are shown below.

Launch the ltr gui

Code: Select all

$HOME/linuxtrack/bin/ltr_gui
Select the Misc. tab
Click on the Install TrackIR firmware

Here you can download and allow it to install it for you but I went with my install of trackir in wine. I had installed it earlier in wine to see if I could get that to work...nope. So for me I selected "Extract from unpacked" most people will probably use "Extract from installer".
Image

**Install the wine bridge app**

Now I was not able to use the button on this page to "Install Linuxtrack-Wine support..." so I had to install the support manually.
So at this point you should use wine to run this program "#HOME/linuxtrack/share/linuxtrack/linuxtrack-wine.exe" inside of the wine prefix where you have the game installed that you want to use with Linuxtrack. For me this is simple as I use Lutris to run and manage all of my windows games.

In Lutris you select your game from inside the app(Lutris) and then at the bottom of the apps(Lutris) page click the right arrow and select "Run EXE Inside Wine Prefix"
Image

Select the linuxtrack-wine.exe from the directory #HOME/linuxtrack/share/linuxtrack/. Let the installer run and select okay or finish.

**Place the missing TIRViews.dll.**
Now here is where I did have to have trackir installed in either a windows install, VM windows install, or a wine install of it. For some reason when the firmware is extracted this dll was not being copied over so I had to find a copy of it manually and the track the simlink back to where it was pointing from my wine prefix.

I found the dll in my trackir install directory "C:\Program Files (x86)\NaturalPoint\TrackIR5\" again this could be in your trackir install in wine as i had done as a test earlier or in a windows install.
Copy the TIRViews.dll and paste it in the #HOME/.config/linuxtrack/tir_firmware/ folder. You may have to open this folder as root to paste but I was able to open and paste without being root.

That was it...for me I launched my Falcon4 in Lutris and my trackir turned on automatically and was ready to go... I had to check use track ir in my controller advanced settings under Falcon4 BMS.

If you need to update the game profile list, as some need this profile to run, use

Code: Select all

~/linuxtrack/bin/ltr_extractor –update


Linuxtrack to antimicrox to Joystick/Mouse/Keyboard
Here is another little jewel that @uglyDwarf built in to linuxtrack.
Some uses where I apply it is… Janes Longbow2 running in PCEM. Janes Longbow2 has a 3D cockpit mode where the view can be controlled by joystick or the number keypad. I use antimicro to translate my linuxtrack server output to the Number keypad. Yo can adjust the speed of your head movement in the longbow ca.ini file.

Another example is running Mechwarrior 2 in dosbox. Mechwarrior 2 uses your mouse to control your torso view and targeting reticle. So I have antimicro pass the Pitch and Yaw axis to the Mouse and then I can use head tracking in MECH2.

If you do not have antimicrox you can probably install it through your distros software repository. Most of them have this built in to theirs so it is a quick and easy install. Info https://antimicrox.github.io/

Check to see if your user is in the plugdev group.
Run groups in the terminal

Code: Select all

groups
If you do not see the plugdev group in the list add your user to that group

Code: Select all

sudo usermod -a -G groupname username
Replace the username listed in the command with your user name

setup the input with these terminal commands. Run one at a time

Code: Select all

modprobe uinput

Code: Select all

sudo chgrp plugdev /dev/uinput

Code: Select all

sudo chmod 660 /dev/uinput
Launch linuxtrack before running the server below.

Code: Select all

~/linuxtrack/bin/ltr_gui
Joystick emulation mode:

Code: Select all

~/linuxtrack/bin/ltr_pipe --output-file=/dev/uinput --format-uinput-abs
Leave this terminal open

Launch antimicrox...or if you already had it open you should see that it now sees your Linuxtrack as a Joystick. The axis are seen by antimicrox as follows.

• Axis 1 = Yaw
• Axis 2 = Pitch
• Axis 3 = Roll
• Axis 4 = Move left/right
• Axis 5 Move up/down
• Axis 6 Move backwards/forwards
Image

From here you can start to edit what each axis does.
Image
Last edited by fwfa on Wed Oct 23, 2024 7:41 am, edited 2 times in total.
jillian.smythe
NaturalPoint Employee
NaturalPoint Employee
Posts: 554
Joined: Fri Sep 02, 2022 6:40 am

Re: A not so New Hope for Linux

Post by jillian.smythe »

Please note that the above method is not tested or supported by OptiTrack (TrackIR's creator). It may involve replacing or modifying the firmware on your TrackIR device, which will void your warranty. While users have the freedom to explore these methods, they do so at their own risk, and OptiTrack cannot provide support or assistance if issues arise as a result of these modifications. For those willing to proceed, please be aware that this is a non-standard use-case and is outside of our official support channels.

Kind Regards,
Jillian Smythe
TrackIR Support Representative
fwfa
Posts: 5
Joined: Sat Jul 27, 2024 5:59 am

Re: A not so New Hope for Linux

Post by fwfa »

To help ease the mind of the users that may try the approach above..

There are NO MODIFICATIONS TO TRACKIR HARDWARE included in the step above. Rather simply setting up software on Linux that can read the TrackIR signal from the official firmware.
Replicators
Posts: 4
Joined: Wed Sep 25, 2024 1:17 pm

Re: A not so New Hope for Linux

Post by Replicators »

jillian.smythe wrote: Mon Oct 21, 2024 10:47 am Please note that the above method is not tested or supported by OptiTrack (TrackIR's creator). It may involve replacing or modifying the firmware on your TrackIR device, which will void your warranty. While users have the freedom to explore these methods, they do so at their own risk, and OptiTrack cannot provide support or assistance if issues arise as a result of these modifications. For those willing to proceed, please be aware that this is a non-standard use-case and is outside of our official support channels.

Kind Regards,
Please tell the devs to atleast make the driver in the linux kernel, third party will make apps for it then, all they need to do is make a driver though. Lot's of people are moving to linux, you are eventually gonna be alienating half of your customer base because you guy's don't want to do anything for linux.
Post Reply