When I get to work, I connect my Macbook to a second monitor. However, in my case, if the monitor is not switched on, the Macbook cannot detect its ID (which lets it load the last set resolution, desktop background and physical arrangement). What I would have to do is to open the Display preference pane and click “Detect displays” which is quite annoying. Today I found a command line tool (which does the same thing), so now I just have to shift-cmd-enter to bring up my DTerm and type detectdisplays
.