A first direct run xrandr command to view information about the device:
Screen displays the current information of the connection device, after running below
PS: I have used HDMI cable to connect an external monitor and the host
wangju@wangju-HP-348-G4:~$ xrandr Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192 eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
Description:
1.eDP-1 as the primary link interface
2.HDMI-1 is connected to the display interface
Second, set up a dual-screen display:
(1) Open the external display, dual display the same content - Cloning , (highest resolution Auto)
wangju@wangju-HP-348-G4:~$ xrandr --output HDMI-1 --same-as eDP-1 --auto
(2) Open the external monitor, set to the right extension
wangju@wangju-HP-348-G4:~$ xrandr --output HDMI-1 --right-of eDP-1 --auto
[note]
Note that, before use xrangr command to set the dual-screen, need to run a command to view xrandr VGA, LVDS and HDMI interface, and the interface connections correct name, as described above: eDP-1 and HDMI-1
Reference documents: