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`:
Xephyr :1 -screen 1500x800x24 &
xdotool search --name Xephyr windowmove 0 437
Start applications in Xephyr window with DISPLAY=:1 firefox
. Xephyr does not support hardware acceleration, but virtualgl
can help here.
Best workaround:
Use weston
with Xwayland
. 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 like evilwm
). It serves as background environment only, weston will cover it.
Create a custom myweston.ini
file like this one (see man weston.ini
):
[core]
shell=desktop-shell.so
idle-time=0
[shell]
panel-location=none
locking=false
[output]
name=X1
mode=1366x768
[output]
name=X2
mode=1500x768
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:
# start weston with custom config and two output windows
weston --socket=wayland-1 --config=$HOME/myweston.ini --output-count=2 >$HOME/weston.log 2>&1 &
sleep 1 # wait until weston is ready
# get window id's from logfile and move windows at target (xwininfo could give id's, too)
xdotool windowmove 0x$(printf '%x\n' $(cat $HOME/weston.log | grep 'window id' | head -n1 | rev | cut -d' ' -f1 | rev)) 0 0
xdotool windowmove 0x$(printf '%x\n' $(cat $HOME/weston.log | grep 'window id' | tail -n1 | rev | cut -d' ' -f1 | rev)) 1369 400
# start X server Xwayland in weston
WAYLAND_DISPLAY=wayland-1 Xwayland :1 &
sleep 1 # wait until Xwayland is ready
# start your desired desktop environment
DISPLAY=:1 startlxde
The start script above does not set up cookie authentication for X clients. Instead, you can use x11docker to have cookie authentication, too:
# start weston and Xwayland, read X environment
read Xenv < <(x11docker --weston-xwayland --gpu --output-count=2 --westonini=$HOME/myweston.ini)
# move weston windows to target locations
xdotool windowmove $(xwininfo -name "Weston Compositor - X1" | grep "Window id" | cut -d' ' -f4) 0 0
xdotool windowmove $(xwininfo -name "Weston Compositor - X2" | grep "Window id" | cut -d' ' -f4) 1367 400
# start desired desktop environment
env $Xenv startlxde
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.
--pos
.