Hello @micolous, Steam for Mac issues are out-of-scope for this issue tracker, so there may not be much feedback here.
Is there a place where macOS issues can be filed? Would like to voice my support for this feature on macOS and possibly even Windows, as it makes input support a LOT easier to do by allowing users to set
SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD=0 SDL_GAMECONTROLLER_IGNORE_DEVICES="" %command%
instead of having to go through Steam's settings menus to disable Steam Input.
I second this, and would too like at least so much as a place to file tickets for the macOS version of Steam. :/
Looks like there isn't going to be any feedback here on a Steam for Mac feature requests. Without personally knowing a better answer, please use Steam Support for issues with the Steam for Mac client.
Closing as out-of-scope.
Apologies for resurrecting an ancient and off-topic thread, but since this is still one of the first results on Google and I have a solution, I thought I'd post it here.
A working launch options example from me messing around with RED4ext on Cyberpunk for Mac:
/bin/sh -c "open --env DYLD_INSERT_LIBRARIES=\"$STEAM_DYLD_INSERT_LIBRARIES:@executable_path/../../../red4ext/RED4ext.dylib:@executable_path/../../../red4ext/FridaGadget.dylib\" --env DYLD_FORCE_FLAT_NAMESPACE=1 -nW %command% --args -fullscreen"
Which is roughly equivalent to what you would expect from writing: DYLD_INSERT_LIBRARIES=red4ext/RED4ext.dylib:red4ext/FridaGadget.dylib %command% -fullscreen (which definitely does not work)
Here's a breakdown of all the incantations:
/bin/sh and pass everything else as one big string with -c%command% is automatically enclosed in single quotes ('), so the string we pass to -c has to be in double quotes ("), and any double quotes inside it have to be escaped (\")%command% refers to the .app bundle, not an executable, so we have to open it with open rather than running it directlyopen passes through any environment variables, but the DYLD_ ones are special, so we have to set them with --env (or else they would inject libraries into the open command rather than the game itself)$STEAM_DYLD_INSERT_LIBRARIES (otherwise it breaks the Steam overlay and maybe other stuff too)@executable_path refers to the executable path inside the app bundle (in my case, Cyberpunk2077.app/Contents/MacOS/), so we need that little ../../../ dance to get back up to the game directory. You could also just use absolute paths if you want.-nW is actually necessary, but it makes open always launch a new instance of the app and wait until it exits, which I think is probably what Steam expects--args gets passed to the game directly, ie -fullscreen is a command-line argument to the game itselfIf you have any questions or comments about this, please don't reply to this thread. You'll just be bothering some innocent developers who have nothing to do with Steam for Mac. I've copied this comment into a separate gist, so go there instead: https://gist.github.com/sgentle/8cace35bfad585a2866a9e825a5203af
SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD=0x1 2018-07SDL_GAMECONTROLLER_IGNORE_DEVICES=""x1 2018-07%command% --args -fullscreenx1 2026-08DYLD_INSERT_LIBRARIES=red4ext/RED4ext.dylib:red4ext/FridaGadget.dylib %command% -fullscreenx1 2026-08SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD=0 SDL_GAMECONTROLLER_IGNORE_DEVICES="" %command%x1 2018-07
First of all, apologies for reporting this here. But, there doesn't appear to be an issue tracker for Steam on non-Linux platforms.
Your system information
Please describe your issue in as much detail as possible:
The Linux Steam client supports setting environment variables with launch options like:
However, it doesn't appear to be possible to set environment variables with the OSX Steam Client.
I'm trying to use
DYLD_INSERT_LIBRARIES(similar to Linux'sLD_PRELOAD) in order load a dylib I wrote, to fix games with buggy input handling. Several games are unplayable with non-QWERTY keyboards, and my library rewrites the return values from SDL input handling routines, so that the games get a QWERTY keysym (that they expect).I compiled my library, then attempted to set launch options on the game (in this case, Prison Architect):
DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=/usr/local/lib/sdl2-hooks.dylib %COMMAND%.This is also possible with any other arbitrary environment variable, and you don't need to build my library to trigger the error. For example, launch options
EXAMPLE=1 %COMMAND%also fails to execute with the same errors.I tested this with Cities Skylines, Prison Architect and Shenzhen IO.
%command%(in lower case) also doesn't work. Not specifying%COMMAND%at all simply causes Steam to pass the launch options as a command line argument.Actual behaviour:
When running the game, Steam fails to launch with:
(Yes, it says "updating"...)
Steam's stdout shows:
When
%COMMAND%is used, Steam on OSX appears to interpret the first environment variable as a path to the executable.Expected behaviour:
I expect Steam on OSX to set the environment variables specified in the launch options in the same way that Steam on Linux supports.
Workaround:
Example.app/Contents/MacOSwhich sets the environment variables, eg:Point
Example.app/Contents/Info.plist->CFBundleExecutableto the shell script.Run
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f ${HOME}/Library/Application\ Support/Steam/steamapps/common/Example/Example.appHowever, a game update may revert the changes.
Other notes:
I think this is a different issue to https://github.com/ValveSoftware/steam-for-linux/issues/4544, as that looks like the root cause was a compatibility issue with some GPU drivers. In this issue, Steam explicitly shows an error message that it was unable to start the game.
SDL, used by many games on Steam, also allows control over some of its options through environment variables, even on non-Linux platforms. Being able to set them may be useful for some users.
Steam also doesn't appear to honour the
LSEnvironmentproperty inInfo.plist.