Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I run a TwinView, dual monitor system. I like to play games fullscreen on one of the monitors, not spanning both. With wine, this works by just setting it to desktop mode and setting the resolution to that of one screen. For OpenTTD, I used Compiz's Window Rules plugin.

But I have a few native games that this doesn't work for. Today's experiment involved Prey (Doom 3 engine) but I've had similar issues with other ID engines.

So in short: has anybody found a way of having Prey/OpenAreana/Doom3/etc run in windowed mode but with fullscreen decorations (that is to say, no borders and above the panel)?

share|improve this question
add comment

3 Answers 3

I had the same issue with Boxee, but managed to solve it by following the steps described on their forum.

In short

  1. Install wmctrl by opening a terminal and issuing

    sudo apt-get install wmctrl
    
  2. Set your game to start in windowed mode.

  3. Use wmctrl to get the list of window names and pick yours

    wmctrl -xl
    
  4. Use wmctrl to switch it to fullscreen, use the "something.something" you got out of the list in step 3. Here I'll use Boxee as an example:

    wmctrl -x -r Boxee.Boxee -b toggle,fullscreen
    
share|improve this answer
add comment

You could try poking around in your X settings to try to turn one monitor off. This is a workaround not a fix someone else will probably have a better answer.

share|improve this answer
    
Sure but that's not what I'm aiming for. I have the required metamode string active in my configuration. I want to still be able to access the rest of my system while in a game, be that just seeing what's happening in Gwibber on the other screen or just telling the time. –  Oli Feb 16 '11 at 15:07
add comment
up vote 0 down vote accepted

Well after years of putting up with just having decoration, I've found a fix. The problem is SDL. It doesn't seem to adhere to the standard way of painting windows, making them impossible to target with Compiz (to then remove decoration via the FULLSCREEN hint)... Until now.

You can set the SDL_VIDEO_X11_WMCLASS environment variable and the window will take on that class. This doesn't automatically mean anything by itself but when you ask Compiz to render that class as FULLSCREEN, you've got what you always wanted.

You don't have to set it globally. Just change you launchers to something like this:

env SDL_VIDEO_X11_WMCLASS=pie /opt/revengeofthetitans/revenge.sh

And set Compiz's Window Rules up to target class=pie for fullscreen.

I should note that it's still a window. Games will need to be set to be in windowed-mode. Most have an option in their settings.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.