11

I am currently able to start a game with Play on Linux but it always displays the game full screen on my second monitor.

Is there a way to configure Play on Linux or wine to specify which monitor to display on?

  • I guess, you need to create a ticket if you really want someone to take a look. And probably bountysource.com to speed up the process – Sergei Feb 25 '14 at 22:50
3

I play Windows games on Linux too, and my go-to workaround for this is to tell Wine to emulate a virtual desktop. For some reason, this makes Wine start up on whichever monitor the PlayOnLinux window is on.

Full Steps to set up your game:

  1. Open PlayOnLinux

  2. Click on your game, and click the "Configure" button at the top of the main interface.

  3. Go to the "Wine" tab and click "Configure Wine".

  4. In the Wine Configuration window, click on the Graphics tab and check the box that says "Emulate a virtual desktop". Change the desktop size to be the size of the monitor you want to use for playing games.

Then to open your game:

  1. Open PlayOnLinux

  2. Drag the PlayOnLinux window to the monitor you want to play your game on

  3. Run the game, then keep your mouse cursor on the same monitor until Wine launches. After Wine launches, you can play the game on that monitor, and also use your other monitors like normal.

| improve this answer | |
  • 2
    Doesn't work for me. I try to play Portal 2. It still opens on my secondary screen on the left. – Paul Jun 20 '16 at 0:36
  • 2
    @Paul: Why are you trying to run Portal (2) through Wine? It can run natively on Linux and OS X. – David Foerster Aug 28 '17 at 10:45
  • @DavidFoerster Didn't know that back then. It runs fine natively now. – Paul Aug 28 '17 at 20:36
1

Dual (or multiple) monitors can be referred to through a modified DISPLAY environment variable.

Usually, it's set to :0, but the individual screens can be referred to by their own numbers, like :0.0 and :0.1 for a dual monitor setup.

As a disclaimer, I've tinkered with this in the past, but my dual monitor system is down at the moment so I can't empirically test it to make sure. Give it try though.

DISPLAY=:0.0 wine ...
DISPLAY=:0.1 playonlinux ...

This should restrict the output to a single screen. Hmmm, I have a nagging thought that it refers to the multiple desktops available with many desktop environments. Desktop 1,2,3,4 and such.

This might not work. (There, I said it...)

I just tried this on my single monitor laptop... :0.0 displays on the current screen, current desktop.. while :0.1 returns "cannot connect" ... and did NOT display anything on any screen or desktop. This shows promise! Try it!

| improve this answer | |
  • with DISPLAY=:0.1 game exits with error: Player data archive not found at 'C:/Program Files/Hearthstone/Hearthstone_Data/data.unity3d', using local filesystem01b8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. While DISPLAY=:0.0 works fine – Eugen Konkov Feb 19 '18 at 13:58
  • Has anyone ever found a real solution for this? No matter which game I try, they all start on the wrong monitor, and do not seem to start at all when using DISPLAY=:0.1 – TheSHEEEP May 2 '19 at 19:07
  • The :0.1 part has to be quoted, eg. DISPLAY=":0.1". – machineghost Nov 2 at 18:01
1

There is an option you can use in xorg.conf, to swap your monitors and select first which you want (but may just work for nvidia? i can't test without):

In my case, my /var/log/Xorg.0.log identifies 2 monitors:

[ 37083.836] (--) NVIDIA(GPU-0): HP LA2006 (DFP-0): connected
[ 37083.836] (--) NVIDIA(GPU-0): HP LA2006 (DFP-0): Internal TMDS
[ 37083.836] (--) NVIDIA(GPU-0): HP LA2006 (DFP-0): 330.0 MHz maximum pixel clock
[ 37083.836] (--) NVIDIA(GPU-0): 
[ 37083.847] (--) NVIDIA(GPU-0): DELL S2419H (DFP-1): connected
[ 37083.847] (--) NVIDIA(GPU-0): DELL S2419H (DFP-1): Internal TMDS
[ 37083.847] (--) NVIDIA(GPU-0): DELL S2419H (DFP-1): 340.0 MHz maximum pixel clock

And, adding this option to "Screen" Section in xorg.conf did the work:

Option  "nvidiaXineramaInfoOrder" "DFP-1, DFP-0"

It worked for me right now, just restarting X after the change, and can play windows games in full screen in my main or first monitor.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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