How to Move the Ubuntu Login Screen to Your Main Monitor

Turning on a dual-monitor Ubuntu desktop PC or docked laptop only to find the password box sitting on your secondary side monitor — or trapped on a living-room TV that is switched off — while your real primary desk screen stays blank purple until you sign in happens because Ubuntu tracks login-screen layouts separately from your desktop.

Once you sign in, Ubuntu loads your personal monitor configuration, yet the login screen itself (managed by gdm3) relies on its own separate display file. Copying your saved layout over fixes the login screen location cleanly.

Save Your Primary Monitor Layout in Ubuntu Settings First

Make sure Ubuntu has written an up-to-date personal monitor configuration file reflecting which display you actually want as your primary screen.

  1. Sign into Ubuntu Desktop normally.
  2. Open Settings -> Displays.
  3. Verify your monitors are arranged left-to-right properly, and check the Primary Display dropdown at the top selects your main desk screen.
  4. If you did not tweak anything recently, nudge one setting slightly (or toggle Primary Display back and forth once) and click Apply -> Keep Changes so Ubuntu writes a fresh layout file at ~/.config/monitors.xml.

Copy Your Display Layout to the Ubuntu Login Screen

Applying your personal layout file directly to GDM ensures the lock/login screen places the password box on your chosen primary display right from boot.

  1. Press Ctrl + Alt + T to open Terminal.
  2. Run ls -l ~/.config/monitors.xml first to verify your layout file exists cleanly.
  3. Copy it safely to GDM’s configuration folder and assign correct ownership with:
    sudo mkdir -p /var/lib/gdm3/.config && sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/ && sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml
  4. Enter your password when prompted and press Enter.
  5. Save your open work and restart Ubuntu once to test that the login screen greets you right on your main display.

Notes When Docking or Unplugging Laptops

Because GDM stores that exact display profile, changing monitors in the future or moving from a dual-monitor desk to an unfamiliar HDMI projector may need one quick refresh of those two steps whenever you permanently rearrange your monitors. For everyday stationary desks and home dual-screen setups, copying monitors.xml locks the Ubuntu login box neatly onto your main monitor every morning.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.