Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to save my monitor settings? I have an external monitor at work, but each morning i have to plug it in, rearrange the windows from being side by side to being on top of each other. Can I just save this?

share|improve this question

4 Answers 4

First three steps to connect your external monitor the way you want and 4th is to save the settings.

  1. Connect your external monitor and check its supported resolution:

    xrandr -q
    
  2. Give the following command (This will disable your laptop monitor):

    xrandr --output LVDS1 --off --output TV1 --off --output VGA1 --mode 1280x1024 --pos 0x0 --rotate normal
    
  3. If you want both laptop and external enabled:

    xrandr --output LVDS1 --mode yyyyXzzzz --pos 0x0 --rotate normal --output TV1 --off --output VGA1 --mode 1280x1024 --pos 0x0 --rotate normal
    

    (yyyyXzzzz - your laptop resolution.)

    The above configuration will clone your screen. Play with "--right-of / --left-of" option if you want.

  4. If you need this settings while login, add the checks in /etc/X11/Xsession.d/45custom_xrandr-settings (You might need to create one).

    xrandr |grep VGA1 | grep " connected " | if [ $? -eq 0 ]; then xrandr --output LVDS1 --off --output TV1 --off --output VGA1 --mode 1280x1024 --pos 0x0 --rotate normal  #Change the way u need ; fi
    
share|improve this answer

No, there's no way to save configurations on hot-plugged monitors. If you plug in before boot, GNOME should remember the configuration on each boot on a per-device basis (ie, connecting to your monitor at work versus the one at home).

share|improve this answer
    
Damn, ok. Is there a third party application than can do this? I know Mac OS X does this, and Windows 7 (from what I've tried with the little experience I have with W7). –  Oscar Godson Oct 11 '10 at 21:16
    
The GNOME monitor configuration should save this information for hotplugged monitors, too. It does for me. –  RAOF Oct 11 '10 at 23:11
    
RAOF: weird, since discussion on the ubuntu-devel mailing list earlier this week said it doesn't. –  maco Oct 11 '10 at 23:31

Configuration for all your monitors - hot-plugged or not - should be stored in $HOME/.config/monitors.xml by the xrandr plugin for gnome-settings-daemon, which is what actually applies the configuration you make in the Monitors capplet.

Since it seems that this isn't working properly for everyone, there's clearly a bug somewhere. Urgh.

share|improve this answer
    
Yeah, and as maco says, if i shut off the computer and boot it back up, it remembers, just not when it's already on. –  Oscar Godson Oct 12 '10 at 16:39

Ubuntu 12.04 remembers hot-plugged monitor settings. But they are only applied when you reopen the System configuration > Displays applet. This is the case for me, at least, and this is definitively a bug.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.