Monitor choice

Auteur Réponses
rymac Samedi 15 Aoüt 2015 à 6:06

I'm trying to get back to using Linux as my main OS after a stint with Windows due to gaming.  I apologize if this is a dumb question.  I've searched around but I can't find anything to solve my problem: I want PoL to default to my right-hand monitor.  As it is, any game I launch with a Wine configuration using virtual desktops displays on my monitor to the left, which is not the default.  Is there a configuration I'm missing?


[edit] Should have mentioned: Ubuntu 14.04, nVidia custom drivers

Edité par rymac

petch Samedi 15 Aoüt 2015 à 17:26

Placing and sizing windows is the responsability of the window manager.

I think Unity uses compiz in Tahr (if you use Unity); it's a pretty capable window manager, but by default they install no configuration tool for it, so you may have to install CompizConfig Settings Manager first, then use it to set window-specific placement/sizing rules.

rymac Samedi 15 Aoüt 2015 à 21:58

Thank you! I haven't changed the default window manager so I'm using Unity. I'll try out Compiz Config.

Nice work on PoL. It's much simpler than reconfiguring wine for each game like I used to do.
rymac Dimanche 16 Aoüt 2015 à 6:08

I think there's still a problem with the window placement.  I installed ccsm and have tried multiple options for window placement:

  • Smart, using active display
  • Smart, using active display with pointer
  • Pointer, using active display

Every other application that I launch displays their window where I would expect for each of these options.  However, PoL only launches in the exact middle of my monitor on the left no matter the setup.  Wine instances run through PoL also only show on this monitor.  When I run application directly through Wine I don't have this problem; they display according to ccsm settings.

petch Dimanche 16 Aoüt 2015 à 11:58

I was thinking of more explicit settings:

Window Management > Place Windows > Fixed Window Placement > Windows with fixed positions > New
Click on "+" button, select a criteria for the windows the rule will apply to; If you pick Window Class or Window Title you'll probably find out (with the Grab button) that all windows Wine creates have "Wine" class and title, so using that you can only create rules that will apply to all Wine windows. You can also use Window Name, and find out the same way that the window name of Wine windows is the name of the executable that created the window, so you can create application specific rules.
For applications that open dialog boxen (that may not be the case of games), you may also notice that dialog boxen opened by applications also have the executable name as Window Name, so you'll probably want to And combine the Window Name condition with the Window Type being Normal so your rule only picks the main window of the application.

Strangely I didn't find how to force the size of windows using rules in plain CompizConfig Settings Manager, if seems you have to install compiz-plugins package to get that. Once installed,
Window Management > Window Rules (that you may have to activate) > Size rules
From there it works practically like placement rules described above.

Now what you want is probably to set the position of your game window to the top left corner of the monitor you want, and its size to the resolution of the monitor; Compiz should be smart enough to not draw window decorations in this case and just display the game full screen.

Edité par petch

petch Dimanche 16 Aoüt 2015 à 12:55

Thinking of it again (it's been a while since I didn't tinker with this problem), I have probably forgotten about a pre-requirement for this, that may also make resizing unneeded; You may also need to first enable Wine's desktop emulation:

Right-click on game shortcut > Configure Wine > Display tab > Emulate virtual desktop

(check, and set resolution)

With that and a window positioning rule as above you should be good to go.

rymac Dimanche 16 Aoüt 2015 à 18:09

Thanks again for all your help; you went above and beyond in your explanation.  For anyone reading this in the future, the solution to my problem:

  • Using a virtual desktop in my Wine configuration.  This is set to the resolution of my monitor (note: if set to anything smaller, Wine runs in windowed mode and can be moved to whichever position you want.  But that's not as good a workaround)
  • Using CompizConfig Settings Manager > Window Management > Place Windows > Fixed Window Placement tab
  • Added a new "Windows with fixed positions" entry
  • Type: "class=Wine" to force all Wine windows to this position
  • x position: 1920, y position: 0 (1920x1080 is the resolution for both my monitors.  Adjust accordingly.  0,0 begins at the top left of your monitor array)

Thanks again, petch, for your patience

petch Dimanche 16 Aoüt 2015 à 19:23

I'm glad it helped, may it help other people in the same situation :)

Vous êtes ici: Index > PlayOnLinux > Monitor choice