How to set an environment variable for an specific game on Steam for Linux?

14

Well, how? There is that "SET LAUNCH OPTIONS" button, but I believe that is only fit to command line switches.

lvella

Posted 2015-08-08T22:27:17.540

Reputation: 260

Answers

22

It is possible to prefix the command with your environment variable in the set launch options like so:

YOUR_VARIABLE=1 %command%

Aldrik

Posted 2015-08-08T22:27:17.540

Reputation: 706

Does this still work? The linked docs don't mention it. – Jeroen – 2016-10-19T18:49:21.967

It really works according to /proc/<game pid>/environ. – and – 2017-08-06T10:22:14.147

1Is there a way to do this with multiple options?

Would separating them with semicolons work? – Robert Wm Ruedisueli – 2017-08-25T21:33:34.383

You just leave a space, so my current one is mesa_glthread=true R600_DEBUG=sbcl,hyperz,llvm,sisched,forcedma vblank_mode=0 %command%. – pbhj – 2018-03-11T17:05:29.170