Score:0

23.x - Keep display active when TV turns off

tw flag
GRX

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:

codlord avatar
ru flag
You should be able to use `xdotool` and/or `wmctrl` to automate the resize/position of all the windows as per your "alternative". I have used `xdotool` to emulate keypresses and `wmctrl` to setup hotkeys for maximising/focusing certain app windows etc.
GRX avatar
tw flag
GRX
I've looked into `wmctrl`, 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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.