I find it awkward, slow, and cumbersome, when giving a presentation, to:
- Plug in the video cable to my laptop
- Open System Settings
- Find the Display Icon
- Select the "Mirror Displays" checkbox
- Click Apply
- Wait a second and then confirm the settings
Instead, I would like to just run a command or write a script that mirrors my primary display and applies in an "I'm feeling lucky" manner.
I've looked at xrandr, but haven't found anything promising...
The option with
xrandr
for mirroring displays is--same-as
. What you will need to configure as well is the resolutions. I have a laptop and a VGA external monitor. Doingxrandr --output VGA-0 --same-as LVDS
mirrored the displays, but because VGA output is larger in resolution than laptop screen , the laptop screen got stretched too much. In other words, you may need to configure them to match in resolution. For instance, this answer on unix.stackexchange.com shows example: