Description:
I'm running Ubuntu 23.04 on an Intel NUC that has 4 TV's attached. We're merely using it to display metrics in the office.
I wrote a script that turns off the TV's at 6PM, and turns them on at 7AM. The issue is that when the TVs power off, they are removed as a display and so when the TV turns on (one after another) all 4 (Firefox) windows are stacked on top of each other on the first monitor that turns on.
I can fix that manually (via VNC) by minimizing all windows and then maximizing again, but it defeats the purpose of automated power cycling the TV's each day.
Question:
Is there a way to keep the displays available even though the TVs are powered off? Or alternatively; how can I make sure the displays recover their correct (assigned) window when the display setup changes?
I found similar questions where I couldn't find a fitting solution:
xdotool
and/orwmctrl
to automate the resize/position of all the windows as per your "alternative". I have usedxdotool
to emulate keypresses andwmctrl
to setup hotkeys for maximising/focusing certain app windows etc. – codlord Jul 19 '23 at 11:23wmctrl
, from what I've seen (examples) you have to target a window using a title. Sadly due to "tab rotation" in Firefox the title is not static. Please correct me if I'm wrong, but I think this is not fitting as alternative. – GRX Jul 19 '23 at 11:26