How can I set the display mode to "mirror" in a bash script? (Without using the GUI gnome settings). And only once (not everytime a new display is attached)
Edit I got a suggestion to use xrandr "same-as" argument (How to enable "mirror" feature in the display settings using command line?). Thanks for that. But the problem with that solution is that it needs to be done each time a display is attached. I need the "mirror" option to be the default action when attaching a new display. We basically provide devices to a client, but if the client attaches multiple displays, he/she shouldn't need to execute anything. We actually got it working that way on Xubuntu 18.04 (Xfce), but I have no idea if that's default behavior or not.
xrandr
command were reliable. But 22.04 comes by default with Wayland. I would be surprised if xrandr worked on Wayland, as it appears to be specific to Xorg... So, does xrandr work on Wayland? If not, then does Wayland has an equivalent thing? – Levente Dec 01 '22 at 09:25