4

For windows this question was already raised several times, see here1, here2 and here 3. But how does it work with linux distributions? The idea ist: Instead of using 2 monitors, buy a 35 inch 4k monitor and use only 27 inch normally (bottom left rectangle e.g., rest of monitor black) and switch the black area on if needed (e.g. software development with lots of windows, where some people would normally use 2 monitors).

Anybody heard of such functionality?

1 Answers1

2

Window managers usually use XRandR to iterate over all monitors to paint their desktop/workspace elements on each. The trick is to a) remove the real monitor from that list and b) create a virtual monitor to be put on that list.

First see which monitor/output name(s) you got and what size they currently have:

$ xrandr --listactivemonitors
Monitors: 4
 0: +*HDMI-0 1920/527x1080/296+1920+1050  HDMI-0
 1: +DisplayPort-0 1920/509x1080/286+0+1050  DisplayPort-0
 2: +DVI-0 1920/477x1080/268+3840+1050  DVI-0
 3: +DVI-1 1680/433x1050/270+1920+0  DVI-1

Lets say I want to replace the real monitor DVI-0 by a virtual monitor occupying the lower left quarter of it. DVI-0 has a width and height of 1920/477x1080/268. The numbers after the slash are the real world sizes in millimeters and only used for calculating the DPI. A quarter of this is:

960/238x540/134

The position of the entire monitor was +3840+1050. The origin is in the top left, so the virtual monitor should end up 540 pixels lower:

+3840+1590

The command line to effectuate all together results in:

xrandr --setmonitor my-monitor-0 960/238x540/134+3840+1590 DVI-0

Real monitors which are part of a virtual monitor (last command line argument) will not be listed by themselves to window managers etc. any more.

You can create even more virtual monitors on DVI-0. Leave the last argument empty (literal none or '') to skip unlisting any further real monitor (you can’t repeat the same).

For more examples check my other answers.