DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Dual Monitors on Linux


  • Connect VGA cable to laptop;

  • List all monitors' name: xrandr -q, or ls /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, run xrandr --output eDP1 --left-of HDMI1 --auto. To open the external monitor's screen, run xrandr --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.



Published

Jun 24, 2014

Last Updated

Jun 24, 2014

Category

Tech

Tags

  • dual monitors 1
  • i3 5
  • xfce 16

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor