-
Connect VGA cable to laptop;
-
List all monitors' name:
xrandr -q
, orls /sys/class/drm/
when "-q" doesn't work. -
Open this monitor:
xrandr --output VGA1 --auto
, now there should be same output on VGA1 and laptop screen; -
Put screen of laptop (LVDS1) under the screen of 19 inches monitor (VGA1):
xrandr --output LVDS1 --below VGA1 --auto
. If the external monitor connected via HDMI (named 'HDMI1') is at the right side of laptop's screen (eDP1), to open laptop's screen, runxrandr --output eDP1 --left-of HDMI1 --auto
. To open the external monitor's screen, runxrandr --output HDMI1 --auto --left-of eDP1
. -
Move an i3 workspace to monitor VGA1:
i3-msg move workspace to output VGA1
, use any monitor name instead of "VGA1". Use a i3 shortcut instead of command to move workspace between monitors: add the following codes into ~/.i3/config# move workspace to left/right screen bindsym $mod+Shift+Left move workspace to output left bindsym $mod+Shift+Right move workspace to output right bindsym $mod+Shift+Up move workspace to output up bindsym $mod+Shift+Down move workspace to output down
-
Close a monitor:
xrandr --output VGA1 --off
;
These settings worked both on Xfce and i3 wm.