Skip to content

Instantly share code, notes, and snippets.

@Ethorbit
Last active January 28, 2025 08:26
Show Gist options
  • Save Ethorbit/bb90300425cca5dc10c7d0c7b697182e to your computer and use it in GitHub Desktop.
Save Ethorbit/bb90300425cca5dc10c7d0c7b697182e to your computer and use it in GitHub Desktop.
Fix Steam game using wrong X DISPLAY due to Valve's container runtime disregarding host environment

If you ran the Steam process or Flatpak with a custom DISPLAY #, you might have noticed that games continue to use DISPLAY=:0 regardless

The reason for this is that Valve created their own container runtime called 'Steam Linux Runtime', and for whatever reason, they made the containers disregard host environment and did not give users the ability to set custom environment variables.

The "brute force" solution, the only one I know of

  • Right-click the Linux Runtime in your library
  • Manage
  • Browse Local Files
  • Edit the file with the name that contains the words "entry point"
  • At the bottom, just above the exit / main, add DISPLAY=:1 or whatever number
  • Now the games should run on the correct display

Don't like this? Contact Valve

We just need them to add a simple way to configure our own environment variables for the container runtime. Tell them you want this, maybe they'll listen.

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