Skip to content

Conversation

@Pakrohk
Copy link

@Pakrohk Pakrohk commented Nov 24, 2025

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read the Hydra documentation
  • I have checked that there are no duplicate pull requests related to this request
  • I have considered, and confirm that this submission is valuable to others
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers

Fill in the PR content:

Major Linux Backend Re-Architecture (Proton & XDG)

Hey team this PR is a big one It's not just a new feature it's a complete architectural rework for the Linux version of Hydra The goal is simple make Hydra a stable and first-class game launcher that can actually compete with Lutris and Steam on Linux.

I’ve focused on implementing proper standards isolation and execution logic.

Heads up: Since this is a core architectural change, please give the code a thorough review and feel free to refine the implementation (especially shell scripts) based on your deeper system understanding.

What I Implemented (The Technical Breakdown)

1. Standards and Filesystem Compliance (XDG)

  • Necessity: Getting files out of the root user directory
  • Execution: Strict adherence to the XDG Base Directory Specification to separate concerns:
    • Configuration files now live in $XDG_CONFIG_HOME/hydra
    • Persistent data (Prefixes Metadata) moves to $XDG_DATA_HOME/hydra
  • Migration: Includes a fix for a critical bug in the data migration script to ensure zero user data loss when moving to the XDG structure

2. Proton Orchestration & Isolation Module

  • True Isolation: Implemented logic to create and manage a dedicated, isolated WINEPREFIX for every single game This is stored in the $XDG_DATA_HOME/hydra/prefixes/{GameID} path and solves 99% of dependency conflicts
  • Runner Discovery: Added a service to automatically find and list all available Proton and Wine runners on the system (checking standard Steam paths and custom folders)
  • Launch Command: Refactored how games are executed We now use a wrapper script to correctly inject all necessary environment variables like STEAM_COMPAT_DATA_PATH and WINEPREFIX before starting the game binary

3. UI and Desktop Integration

  • New Compatibility Tab: Added a dedicated UI section for Linux settings which gives the user full control
    • Runner Selection: Users can manually select the specific Proton/Wine version per game
    • Launch Options: Implemented management for launch arguments and environment variable toggles (e.g. for MangoHud Gamemode)
  • Desktop Integration:
    • Steam Shortcuts: The system now generates Steam shortcuts that correctly point to the wrapper script ensuring the game launches seamlessly from Steam Deck/Big Picture Mode
    • .desktop Files: Generating and installing standard .desktop files so installed games appear directly in system application menus

⚠️ Focus Areas for Reviewers

  1. Node.js Process Handling: Please verify the execution logic for spawning Proton processes (child_process) to ensure proper POSIX compliance and clean process termination
  2. Wrapper Script: The shell wrapper script that sets the environment variables needs confirmation for maximum compatibility across different Linux distributions
  3. Data Consistency: The updated data models and XDG migration logic need thorough testing against real-world user data to ensure stability

I haven't included screenshots because I believe a feature of this architectural depth is best reviewed by compiling and testing the code directly Thanks for taking the time to review

google-labs-jules bot and others added 2 commits November 24, 2025 01:40
- Implements XDG Base Directory Specification for config, data, and cache paths, ensuring proper file separation.
- Introduces a Proton/Wine compatibility layer with runner discovery and isolated prefixes for each game.
- Adds a "Linux Compatibility" tab to the game options UI, allowing users to select compatibility tools, manage launch options, and toggle environment variables.
- Integrates with the desktop by generating `.desktop` files for installed games and creating Steam shortcuts that use a wrapper script for proper environment setup.
- Fixes critical bugs in the initial implementation, including a data loss issue in the migration script, a conflict in shortcut generation, and non-functional UI elements.
@sonarqubecloud
Copy link

@thegrannychaseroperation
Copy link
Contributor

@Pakrohk thank you for your contribution. I'll be taking a look into it until weekend.
In the meantime, could you run Sonar on your code and check the issues? Thanks.

@moi952
Copy link

moi952 commented Nov 27, 2025

Hi,
This could be great, I have a few questions:

1- Does this mean the Proton version won't be available on Steam but only on Hydra, forcing us to return to the desktop?

2- Installing Windows redistributions doesn't seem to work for me (Bazzite). Do you plan to implement a button for installing the redistributions for each game? That would simplify things a lot.

Thanks for this development, I hope it will be merged quickly and that a new version of Hydra will be released :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants