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

I want my windows to be a specific size (not full screen) and to be in the middle of the screen by default. When I close the application and re-open it, it will be the dimensions I want it to be by default. Is there an easy way to do that? I'm using Ubuntu 11.10 and the Unity desktop enviroment.

share|improve this question
up vote 20 down vote accepted

I don't know if you can simply make all windows behave the same, but you can individually. We'll use Thunderbird as an example.

Make sure you have ccsm installed: Open a terminal (Press Control-Alt-T) and enter

sudo apt-get install compizconfig-settings-manager

Open ccsm. You'll be using the Place Windows and Windows Rules plugins in the Window Management section.

Compiz Window Managment

First, go into Place Windows, select the Fixed Window Placement tab and Select New.

Fixed Window Placement screen

Enter the program name (class=xxxx) and set the starting X and Y coordinates. The coordinates start from the top left corner of the screen. This tells the program where to open on the screen.

Enter placement rules

Next go to the Windows Rules plugin and select the Size Rules tab and new.

Window Rules screen

Enter the program name (class=xxxx) and set the X and Y size. This tells the program what size to open the program in pixels (pixels wide x pixels high).

Enter size rules

Now, open the program you just did this for and it should open where and how big you want it to everytime. Open your program

Note that you will have to do this for every program you want to open in a specific place and a specific size. You can also use one without the other, for instance always having a program open in a specific place but not having it's size defined.

share|improve this answer
That's a great documented answer @James! Do you know if i can set a shortcut, e.g. Super+I to set the current open window to an specific size? e.g. 1280x900 – Leo Gallucci Jan 19 '14 at 17:30
Never mind, i've just found: wmctrl -r :ACTIVE: -e 0,-1,-1,1280,900 and added as a Custom Shortcut within Keyboard Shortcuts settings :) – Leo Gallucci Jan 19 '14 at 21:49
You do need to log out and log in again. – Lawrence I. Siden Mar 11 '14 at 15:25
On Ubuntu 14.04 (maybe also in other versions) you have also to install package "compiz-plugins" in order to have the mentioned features. – Pisu Dec 30 '14 at 20:30
To found the class name of a specific window, you can open a terminal, execute xprop and click with mouse inside the window. – Pisu Dec 30 '14 at 20:34

Check out gdevilspie from the universe repository! You can use it to set a rule for your window by application name and use that rule to resize, unmaximize... really anything window-related.

Gdevilspie Step-By-Step:

  1. Click the Add button


  2. Type "Firefox" in the top-most textbox
  3. In the "Matching tab", check "Window name"


  4. In the box labeled "equal(s)" type: "Firefox"
  5. Under actions checkmark:
    • Unminimize
    • Geometry (set to the desired geometry - you can also use the command-line program xwininfo to get the width/height of a window when you have it resized to where you want it. The same goes for xposition and yposition)
  6. Click Save


  7. Click the Start button
  8. Click "Start devilspie daemon automatically at login" if you want the fix to be semi-permanent.


  9. Hang on to your hat!
share|improve this answer

Firefox not remembering the size and position on the screen. Solution work for me: Press Super compiz on unity plugin...experimental tab...automaximize value = 100. that worked for me.

share|improve this answer



under the [general] section edit or add the size option:

profile =  
integration = true  
size = 1200, 800  
share|improve this answer

Your Answer


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.