Setting primary monitor (with dual monitors) on Ubuntu 10.10 (maverick)

I have my laptop connected to an external monitor, and I want the external monitor to be the primary display (i.e. with the menu bar displayed on it.) For some reason, there’s no GUI element to set this. I had to read a bunch of man pages, but when all else fails, trusty old xrandr to the rescue:

vijayp@ike:~$ xrandr --output HDMI1 --primary

In case you don’t know what your display is called, just run “xrandr” on its own. This is what my laptop says:

vijayp@ike:~$ xrandr
Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       60.0*+
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
HDMI1 connected 1600x1200+1280+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200      60.0*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
DP1 disconnected (normal left inverted right x axis y axis)

Posted

in

by

Tags:

Comments

8 responses to “Setting primary monitor (with dual monitors) on Ubuntu 10.10 (maverick)”

  1. Colin Hastie Avatar
    Colin Hastie

    This at once robbed the laptop screen of its menu without putting one on the external HDMI monitor.

    Using Ubuntu 10.10 on Acer Aspire 7735Z

  2. Marty Fried Avatar

    Thanks, you’re the first site after a lot of searching that showed a simple way to get my DVI-output monitor (on the left) to be primary. running:
    xrandr –output DVI-0 –primary
    switched it to exactly what I wanted, which I think should have been the default anyway.

    This is on Ubuntu 10.04, btw.

  3. GT-Force Avatar
    GT-Force

    How can you make this permanent? After I do this, log out and in, it goes back to how it was. Thanks.

  4. Aaron Avatar
    Aaron

    Thank you! :3

  5. r0ji Avatar
    r0ji

    Thank you! <3

  6. Artur Avatar

    I have this trouble too (as GT-Force). After reboot settings are down. Excuse me for my English.

  7. z33 Avatar
    z33

    Thanks this set is working 🙂

  8. Ben J Avatar
    Ben J

    This whole comment thread is quite old but for anyone like me who finds this, if you’re using Ubuntu you can set the xrandr command to start up on boot by adding it to Startup Applications (in unity just search for it, otherwise alt-F2)

    You have to write a bash script, then make it executable, then add that script to the Startup Applications list. Sorry if this sounds too basic for the terminal-savvy. I did it like this (on ubuntu 12.04):

    – make script:
    Open terminal, press ctrl+alt+t;
    Type ‘cd Documents’, so the script will be made in there;
    Type ‘nano Default-Monitor’, to open the text editor and make the script;
    Type:
    ‘#!/bin/bash
    xrandr –output VGA-0 –primary’
    (ctrl+X to exit, make sure to save)

    – set as executable
    Type: ‘chmod 755 Default-Monitor’

    – Set to run on startup
    Open Startup Applications; click Add; browse to Documents and click on Default-Monitor, your program. It should be added to the list and next time you boot the script will run automatically. It seems to work for any profile.

    Again, sorry if this sounds condescending but it worked for me and a month ago I’d have had no idea how to do this unless it was written this simply.

Leave a Reply

Your email address will not be published. Required fields are marked *