Use xming / vcxsrv / xwin to install two shields for i3wm

I would like to use i3 in my Windows 10 Linux subsystem with two monitors.

FROM

vcxsrv.exe :1 -nodecoration -wgl  -multimonitors -screen 0 3840x1160

      

I can create one large window that spans my two monitors. This configuration works with i3, however i3 recognizes it correctly as one screen with a flaw that sometimes the windows are cut in half when the range is on both monitors.

I would like to use i3 with two separate screens, for example:

vcxsrv.exe :1 -nodecoration -wgl -screen 0 @1 -screen 1 @2

      

However, I can run i3 on either screen 0 ( export DISPLAY=:1

) or screen 1 ( export DISPLAY=:1.1

), but not both at the same time.

Maybe it has something to do with xrandr, since it doesn't recognize my configuration:

xrandr -q

:

xrandr: Failed to get size of gamma for output default
Screen 1: minimum 0 x 0, current 1920 x 1160, maximum 32768 x 32768
default connected primary 1920x1160+0+0 0mm x 0mm
   1920x1160       0.0*

      

How can I use both separate screens with i3?

+3


source to share


1 answer


I played around with this a bit, and while I didn't find a solution for getting xrandr to recognize multiple monitors, I found that the i3 has an undocumented config option that allows simulating multiple monitors to one. In my i3 config, I added a parameter:

fake-outputs 1920x1080+0+0,1366x768+1920+0

This makes the i3 the processed massive display that VcXsrv provides as 2 logical displays, and by adjusting the dimensions / offsets to monitor dimensions, it renders displays perfectly on each monitor.



Also, this is the command I use to start VcXsrv:

vcxsrv.exe -screen 0 @2 -wgl -nodecoration +xinerama -screen 1 @1 -wgl -nodecoration +xinerama

The reason for switching screens is that when in use 0 @1

and 1 @2

the larger screen displays a taller screen with smaller screen sizes. This radio button puts the polybar on the large screen (left) with the correct dimensions. This may not be the case for everyone.

0


source







All Articles