Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is my configuration:

  • Ubuntu 12.04 (with Unity)
  • Laptop
  • External screen to use the laptop in dual screen mode
  • Several windows spread on both screens and on 4 workspaces

When I have meetings I unplug the screen from my laptop to take the laptop to the meeting room, so all the windows are re-positioned to fit in one screen only. After the meeting, when I plug it back to the external screen, I need to manually move all the windows back in place.

Is there a way to save and restore the windows, so that I don't have to do this manually everytime? A script with save/restore options would be great!


Note: I don't think this is a duplicate of "How do I save sessions or reopen last-used applications?", since I keep my computer turned on (the solution explained in the other post is about using an hibernation tool tweak).

Note 2: I found this script, but it does not work.

Edit (2013-06-03) the tool wmctrl can help to get and set windows positions. I created a Shell script with it, but there is a known bug in Unity which makes it impossible to use there. Even on XFCE the result is random sometimes...

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.