My secondary monitor is partially broken in the top 1/3 of the screen so I want to add blackbars and have something like in the picture below.
The top part it's how everything is now. The bottom part is what I want to achieve. The resolutions listed there are the maximum for each screen.
This is the xrandr output for the second screen:
VGA1 connected 1920x1080+1366+12 (normal left inverted right x axis y axis) 890mm x 500mm
1920x1080 60.00*+
1600x1200 60.00
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 74.98 59.89
1280x960 60.00
1360x768 60.02
1280x800 59.81
1152x864 75.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32
640x480 75.00 72.81 66.67 60.00
720x400 70.08
Best Answer
Possible workarounds:
Use empty panels covering the damaged region to force windows using the remaining space. For example,
xfce4-panel
can be configured well. It depends on your desktop environment how well this works. Xfce and LXDE will work fine, Gnome will make problems, I assume. This does not help for fullscreen applications that would cover the panel, too, for example, firefox+F11, or VLC in fullscreen.Workaround for fullscreen applications: Starting
Xephyr
with desired screen size, positioning it and starting applications inside it. Automate this with a script and 'xdotool`:Start applications in Xephyr window with
DISPLAY=:1 firefox
. Xephyr does not support hardware acceleration, butvirtualgl
can help here.Best workaround:
Use
weston
withXwayland
. It supports hardware acceleration and fullscreen applications.Use a quite lightweight window manager like
openbox
at startup (or even better, one without window decorations at all likeevilwm
). It serves as background environment only, weston will cover it.Create a custom
myweston.ini
file like this one (seeman weston.ini
):Create a script like this one to start weston in evilwm and Xwayland in Weston (customize positions of 2 weston windows). Finally, start your desired desktop environment:
The start script above does not set up cookie authentication for X clients. Instead, you can use x11docker to have cookie authentication, too:
Xwayland appears as a client "window" of weston. Unfortunately, due to a bug in Weston or Xwayland, it does not always sit at position 0:0. You can move Xwayland to desired position with [META]+left-mouse-button. I wrote a bug report, but got noresponse.