How to Mirror a display to an external Monitor
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
Issue
- Need to mirror / clone a laptop monitor to a external monitor.
- How to clone a laptop display onto a TV and keep the same resolution.
Resolution
Using GNOME's Graphical Display tool
Gnome's Display Dialog can be used to permanently configure the display(s) for a user's session.
-
Run
gnome-display-properties
by choosingSystem -> Preferences -> Display
-
Connect the external monitor and configure the settings as desired for multiple displays:
-
Check the "Mirror Screens" box to indicate the screens should be cloned; and choose "Apply":
-
Choose the one resolution that both monitors should be using; and choose "Apply":
-
Note: Depending on the model of laptop and monitor used, black borders/stretching may be applied if the resolution or aspect ratio does not match the smaller/wider/taller display.
-
-
Disconnect the monitor and configure the laptop as desired for single monitor use; and choose "Apply".
-
When the external monitor is re-connected, Gnome will assume the user's desired mode during the gnome-session.
-
Disconnecting the external monitor will cause Gnome to return to the single monitor configuration.
Using "xrandr" a command line tool
The xrandr
command can be used to temporarily configure the display(s) for a user's session.
-
Open a terminal as the user when in a graphical environment.
-
Run the command below to get the display names:
$ xrandr Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1600x900 60.0*+ 40.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 HDMI3 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm 1920x1080 60.0*+ 1600x1200 60.0 1680x1050 59.9 1680x945 60.0 [...]
-
Set the displays so that the external monitor will mirror the current display:
$ xrandr --output HDMI3 --same-as LVDS1
-
Note: If
xrandr
leaves the environment in a poor state, then restartingXorg
, changing runlevels, or rebooting should restore the previous configuration.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments