Ubuntu: Remember last window location


How can I configure my Ubuntu to start all program windows at the last window location?

In compiz I only can configure that all windows start in one corner, centered, etc. Or I have to define rules for each program where it starts...that is too laboroius.


Sadly nor the window manager ( metacity or compiz ) nor Xorg serve that purpose.

In Ubuntu ( and any GNU/Linux in general ) remembering the last window location is up to the application. (As far as I can remember Firefox do that, and so Gedit ).

As you said Compiz has fine control on where to place which application window, but not the simple option of remembering its last status.

Please refer also to these idea in Brainstorm:

and this bug ( marked as Wontfix ):



There is really no way to accomplish this in Compiz without creating a custom plugin, since it is the job of an application to keep track of this. It is possible to write a plugin that does this, probably by basing it on the Window Placement plugin. However, there is no existing solution for it.


You can, but the window needs to have a unique class/name/title/id or some such that you can refer to.

Start Compiz settings:

% ccsm  

Select the "Place Windows" plugin

Make sure it is enabled

Select the "Fixed Window Placement" tab

Then click on "New" under "Windows with fixed positions".

Now you need to specify which windows have what fixed positions. Click on the "+" sign to bring up a window selection dialog, this will allow you to specify the window by class/title/etc.. You can choose one of the types and grab the window to see what it's value is to see if it's something unique you can use for placement. You can add multiple conditions and thereby end up with interesting combinations such as:

(class=myterminal) & title=one  

Then specify your X and Y positions, save it and close the settings manager. The next time you place a window that fits the definition you've specified, it should place it in the appropriate location (you may need to 'compiz --replace' though I doubt it).

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »