Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/opentrack/opentrack/llms.txt

Use this file to discover all available pages before exploring further.

The Wine protocol enables head tracking for Windows games running on Linux through Wine, Proton, or Steam Play. It bridges FreeTrack-compatible Windows games to OpenTrack running natively on Linux.

How It Works

The Wine protocol:
  1. Creates a shared memory region accessible to Wine processes
  2. Launches a wrapper program (opentrack-wrapper-wine.exe.so) inside Wine
  3. The wrapper acts as a FreeTrack bridge, making tracking data available to Windows games
  4. Games running under Wine access tracking data as if on native Windows

Architecture

Linux OpenTrack → Shared Memory → Wine Wrapper → Windows Game
     (native)        (IPC)         (Wine)         (Windows)
This allows Windows-only games to use head tracking without dual-booting.

Compatible Environments

Wine

Run any Windows game with Wine - configure Wine path and prefix

Steam Play (Proton)

Automatic Proton games via Steam - specify AppID

Custom Proton

Manual Proton setup - specify Proton version and prefix

Prerequisites

Required Packages

1

Install Wine

Install Wine or Proton on your system:Ubuntu/Debian:
sudo apt install wine wine64
Fedora:
sudo dnf install wine
Arch:
sudo pacman -S wine
2

Steam Play setup (optional)

If using Steam:
  1. Enable Steam Play in Steam settings
  2. Choose a Proton version
  3. Note the game’s AppID (found in Steam URL)
3

Verify Wine works

Test Wine installation:
wine --version

Setup Instructions

Standard Wine Setup

1

Select Wine protocol

In OpenTrack, go to the Output dropdown and select “Wine — Windows layer for Unix”.
2

Configure Wine variant

Click the settings button and select “Wine” variant.
3

Choose Wine version

Wine executable path:
  • System Wine: Select “WINE” (uses system default)
  • Custom Wine: Select “CUSTOM” and browse to Wine binary
  • Wine-Staging/TKG: Enter custom Wine path
4

Set Wine prefix

Wine prefix: Location of your Wine virtual Windows installation
  • Default: ~/.wine/
  • Custom: Any directory containing a Wine prefix
  • Must be an absolute path (not relative)
5

Configure protocol type

Headtracking Protocol: Choose FreeTrack compatibility mode
  • Protocol 1: FreeTrack 1.x
  • Protocol 2: FreeTrack 2.0 (recommended)
  • Protocol 3: TrackIR emulation
6

Enable sync options (optional)

  • ESYNC: Enable for better performance
  • FSYNC: Enable if kernel supports it
7

Start OpenTrack

Click Start. OpenTrack will:
  • Create shared memory
  • Launch Wine wrapper process
  • Wait for game to start
8

Launch your game

Start your Windows game through Wine:
wine /path/to/game.exe
The game should detect FreeTrack/TrackIR automatically.

Steam Play (Proton) Setup

1

Enable Proton in OpenTrack

In Wine protocol settings:
  • Select “Proton” variant
  • Choose “Steam Play” mode
2

Find game AppID

Get your game’s Steam AppID:
  1. Go to game’s store page
  2. Look at URL: store.steampowered.com/app/[APPID]/
  3. Or right-click game in Steam library → Properties → Updates
3

Enter AppID

In OpenTrack settings:
  • Enter the game’s AppID number
  • OpenTrack will auto-detect Proton version and prefix
4

Start tracking and game

  1. Start OpenTrack
  2. Launch game through Steam
  3. Head tracking should work automatically

External Proton Setup

1

Select external Proton

In Wine protocol settings:
  • Select “Proton” variant
  • Choose “External Proton” mode
2

Set Proton path

Proton version path: Location of Proton installationTypical locations:
~/.steam/steam/steamapps/common/Proton 8.0/
~/.local/share/Steam/compatibilitytools.d/proton-ge-custom/
3

Set prefix path

Proton prefix: Game’s compatibility data folderFormat:
~/.steam/steam/steamapps/compatdata/[APPID]/pfx/
4

Launch game

Start OpenTrack, then launch game with Proton manually or via Steam.

Configuration Options

Wine Settings

OptionDescriptionDefault
Wine PathPath to Wine binarySystem Wine
Wine PrefixWindows environment location~/.wine/
ESYNCEvent synchronizationEnabled
FSYNCFile synchronizationEnabled
ProtocolFreeTrack versionProtocol 2

Proton Settings

OptionDescription
Proton VersionPath to Proton installation
Steam PlayAuto-detect from AppID
External ProtonManual Proton configuration
AppIDSteam game application ID
Proton PrefixCompatibility data location

Environment Variables

The protocol sets these environment variables:
# Wine/Proton selection
WINEPREFIX=/path/to/prefix

# Performance options  
WINEESYNC=1    # Enable ESYNC
WINEFSYNC=1    # Enable FSYNC

# Protocol selection
OTR_WINE_PROTO=2  # FreeTrack protocol version (1-3)

Troubleshooting

”Failed to start Wine!”

Cause: Wine binary not found or not executable. Solution:
  1. Verify Wine is installed: wine --version
  2. Check Wine path in settings is correct
  3. Ensure Wine binary is executable
  4. Try using system Wine instead of custom path

”Prefix has not been defined!”

Cause: Wine prefix path is empty. Solution:
  1. Enter absolute path to Wine prefix (e.g., /home/user/.wine/)
  2. Create prefix if it doesn’t exist:
    WINEPREFIX=~/.wine wine wineboot
    
  3. Verify prefix directory exists and is valid

”Must specify application id for Proton”

Cause: Using Steam Play mode without AppID. Solution:
  1. Find game’s AppID from Steam store page URL
  2. Enter AppID in OpenTrack settings
  3. Or switch to External Proton mode and specify paths manually

Game Doesn’t Detect Tracking

Symptoms: Game runs but head tracking doesn’t work. Solution:
  1. Check wrapper is running:
    ps aux | grep opentrack-wrapper-wine
    
  2. Verify shared memory:
    ls -l /dev/shm/ | grep wine
    
  3. Check protocol version: Try different protocol settings (1, 2, or 3)
  4. Game compatibility: Ensure game supports FreeTrack/TrackIR
  5. Wine/Proton version: Some games work better with specific versions

Wrapper Process Crashes

Symptoms: OpenTrack starts but wrapper exits immediately. Solution:
  1. Check OpenTrack logs for error messages
  2. Verify Wine prefix is valid:
    WINEPREFIX=~/.wine wine wineboot
    
  3. Install required Wine dependencies:
    winetricks vcrun2019 dotnet48
    
  4. Try different Wine version (Wine-Staging, Wine-GE, Proton-GE)

“Can’t open shared memory mapping”

Cause: Shared memory creation failed. Solution:
  1. Check /dev/shm permissions:
    ls -ld /dev/shm
    
  2. Ensure sufficient space in /dev/shm
  3. Verify SELinux/AppArmor isn’t blocking
  4. Try running OpenTrack with elevated permissions

Performance Issues

Symptoms: Game or tracking is laggy under Wine. Solution:
  • Enable ESYNC and FSYNC
  • Use Wine-Staging or Wine-TKG for better performance
  • Check CPU usage - Wine adds overhead
  • Consider using Proton instead of plain Wine
  • Update graphics drivers

Game-Specific Notes

DCS World on Linux

DCS has native Linux support via Steam, but for standalone:
# Set Wine prefix
export WINEPREFIX=~/.wine-dcs
# Start OpenTrack with protocol 2
# Launch DCS through Wine

Elite Dangerous

Works well with Proton:
  1. Use Steam Play mode
  2. AppID: 359320
  3. Protocol 2 (FreeTrack 2.0)
  4. Enable FSYNC for best performance

X-Plane

For X-Plane on Wine:
  1. Install X-Camera plugin in Wine prefix
  2. Use protocol 2
  3. Ensure plugin DLLs are in correct Wine architecture (32 vs 64-bit)

Advanced Configuration

Custom Wine Builds

Optimized Wine builds for gaming: Wine-Staging:
# Install Wine-Staging
sudo apt install wine-staging
# Use in OpenTrack
Wine Path: /opt/wine-staging/bin/wine
Wine-GE / Wine-TKG:
# Download from GitHub
# Extract to ~/wine-ge/
# Use in OpenTrack
Wine Path: ~/wine-ge/bin/wine
Proton-GE:
# Install via ProtonUp-Qt or manually
# Place in ~/.steam/compatibilitytools.d/
# Select in OpenTrack Proton path

Multiple Wine Prefixes

Manage separate prefixes per game:
# Create game-specific prefixes
WINEPREFIX=~/.wine-dcs wineboot
WINEPREFIX=~/.wine-elite wineboot

# Configure in OpenTrack per profile
Profile 1: DCS Prefix: ~/.wine-dcs
Profile 2: Elite Prefix: ~/.wine-elite

Debug Logging

Enable Wine debug output:
export WINEDEBUG=+relay,+seh,+tid
WINEPREFIX=~/.wine wine game.exe
Check OpenTrack logs:
~/.config/opentrack-2.3/log.txt

Technical Details

Shared Memory Structure

struct WineSHM {
    double data[6];      // X, Y, Z, Pitch, Yaw, Roll
    int gameid;          // Game identifier
    int gameid2;         // Confirmed game ID
    unsigned char table[8];  // Game-specific data
    volatile bool stop;  // Shutdown signal
};

Coordinate Transformations

// Position (cm to mm)
shm->data[0] = headpose[TX] * 10;
shm->data[1] = headpose[TY] * 10;
shm->data[2] = headpose[TZ] * 10;

// Rotation (degrees to radians)
shm->data[3] = (headpose[Pitch] * M_PI) / 180;
shm->data[4] = (headpose[Yaw] * M_PI) / 180;
shm->data[5] = (headpose[Roll] * M_PI) / 180;

Wrapper Process

The wrapper executable:
  • Runs inside Wine environment
  • Creates FreeTrack shared memory visible to Windows games
  • Bridges Linux shared memory to Windows memory
  • Handles game detection and protocol translation
The Wine protocol brings Windows-exclusive head tracking games to Linux. While it adds some complexity compared to native protocols, it enables gaming on Linux without dual-booting or virtualization.

Alternatives for Linux Gaming

Native Linux Games

Some games have native Linux versions with head tracking:
  • X-Plane 11/12: Native Linux, use FreeTrack protocol
  • War Thunder: Native Linux support
  • FlightGear: Native, use FlightGear protocol

Dual-Boot Option

For maximum compatibility, consider dual-booting Windows for gaming.

Virtual Machine

Pass-through GPU to VM for near-native performance (advanced setup).