Compared to the environment files in your home directory, this is not a recommended choice, but if you're the only user on the system and changes to. Modify your global environment files, usually /etc/profile or /etc/environment.This would affect all games using SDL and run as your user. bashrc would set it for your Bash shell but that might not be helpful if you're logged in via xdm or one of its many alternatives. Modify your local environment files, located somewhere in your home directory, perhaps.To stop this behavior, you need to set this environment variable to 0. This commit to libSDL2 in 2012 adds an environment variable, SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS, which, as the name suggests, controls whether or not the game will minimize itself if it loses window focus. This behavior is generally caused by SDL, a commonly used library for creating OpenGL contexts for games to render things into. I don't have enough rep to comment on gunix's answer, but someone asked for context, so I'll just write my own answer.