I want all my windows to return to their previous location and size

Hello, I want all my windows to start at the previous location and size when opened. After maximizing and then returning to the normal size, I want the window to return to the previous location and size as well.

Window manager: Marco (built-in Xpresent)
CPU: AMD Ryzen 7 5700G, using the built-in GPU (AMD Radeon RX Vega 8)
OS: Ubuntu Mate, up to date, with Firefox in the snap.

I am wasting a lot of time by resizing and dragging windows. My monitor is a normal HD monitor and I want to buy a bigger one. But then the problem would be even worse.
I can add options to Firefox with "--windows-size 1600,900", but after maximizing it does not return to it previous location and size.

In the settings for the placing a new window, I can choose to centre it. If I select it, then new windows always open in the centre, and if I deselect it then new windows always open at the left.

I have read about others with the same problem, but I have found no solution.

Have you tried to switch to Compiz as windowmanager ?
I don't know if it can do what you ask but at least you can try :slight_smile:

You can switch windowmanager from within MATE-Tweak which you can find in Mate-control-center. You will probably have to install compiz and ccsm first :slight_smile:

sudo apt install compiz-mate compizconfig-settings-manager

There are also a lot of plugins for it if you want more.

2 Likes

I tried that as well and tried many settings in the CCSM.
With Compiz, new windows do not open in the previous location.
After maximizing, Firefox now returns to its previous location and size with Compiz. That is a step forward.

Some combinations of settings in the CCSM seem to have a random effect. Sometimes I can not resize a window, sometimes I can not drag a window to the top of the screen. Sometimes a new window appears under the top bar.

Do I have to restart after changing something in the CCSM?

I'm afraid that the problem has no definite solution.

  • Some applications have configuration setting to remember and restore their previous size and position. Other applications do not care.
  • Some DE/windows managers can do the trick. And other can not.
  • Some applications accept placing options and one can edit their .desktop file to include these options in the app's command line.
  • They say that Compiz has a proper plugin for that. "...you need to install Compiz Config Settings Manager (CCSM) and then go to the "Window Management" section to enable the "Place Windows" plugin."
  • They say that wmctrl command line tool may help to solve the problem like that: https://forums.linuxmint.com/viewtopic.php?p=2052321#p2052321
3 Likes

Usually not, but for some features a "logout and login again" would be wise.

Anyway, if both Marco and Compiz can't do what you want you're out of luck, at least in Ubuntu MATE. You might find another distro with a windowmanager that can do what you want but at the moment you will be restricted to X11 based windowmanagers because Wayland does not support specific windowplacement yet.

EDIT: Last hope -> Devilspie - Community Help Wiki

2 Likes

Thank you ugnvs and tkn.
The "place window" plugin is already enabled.
I will try the CCSM settings for the next weeks in combination with wmctrl and .desktop files and devilspie2. I will change to another distro if I have to.

2 Likes

I notice already a few improvements, with just the CCSM settings.
When the settings seems to have a random effect, then restarting my computer did help.
So it is going in the right direction (I hope).

2 Likes