Prevent full-screen games from minimizing when switching workspaces

When I play games on my Ubuntu desktop, I like to switch workspaces a lot. For example, when waiting for respawn I will quickly switch to a second workspace to select a different music track, or to write a quick reply on IM. What I find very inconvenient is that a lot of games, by default, will minimize when I switch workspace. Because of that, it takes me more time to return to game – a workspace switch short-cut, and then alt+tab.

It turns out that this is SDL feature, so all games build with SDL will behave this way. However, there is an easy, little known way to disable it. Simply set the following enviromental variable

export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0

before starting your game. Or, if you dislike this feature as much as I do, you may want to set that variable in your .profile file, or maybe even /etc/environment.

Enjoy flawless workspace switching when gaming!

Advertisements

Toggle Backlight mode in Unity2D

I really like the “Backlight Toggles” launcher mode, which causes all launcher icons to have a colored background if and only if the application is running. This allows me to quickly see what’s running and what’s not. As far as I know this is the default mode for 12.10.

I was missing this feature on Unity2D. It turns out that I was not the only one who looked for help in the Internet in this matter – actually some people would like to use this feature. I’m going to give you a hand with that! As Unity2D is no longer developed, we cannot hope such feature will be ever implemented, so I prepared a simple script that patches few Unity files and enables that behavior immediately!

To get and run the script, use the following:

Read the rest of this entry »