Remember window position on close for next open?

Forum rules
Before you post please read how to get help
Seano123
Level 1
Level 1
Posts: 38
Joined: Sun Jan 08, 2017 2:04 am

Remember window position on close for next open?

Postby Seano123 » Sun Jan 08, 2017 3:00 am

Hello Forum. Please accept my apologies in advance if this question has been answered before somewhere, as I have searched the MATE column with the words 'remember window placement' and read all the Mate-specific advice but it seems not to have led me onto the right track. I don't want to muck things up with Compiz accidentally.

I am very happy with 18.1 Serena and Mate, yet I miss the ability to place my usual applications' windows on the desktop at the left or right, top or bottom, and then have these applications remember their positioning after closing, for the next time that they are opened.

How is it possible to get an application to remember to position its window in the same place on the desktop next time it is opened?

The exact specifications of my distribution are:
Release Linux Mint 18.1 Serena 64-bit
Kernel Linux 4.4.0-57-generic x86_64,
MATE 1.16.1.
Last edited by Seano123 on Mon Jan 09, 2017 2:38 am, edited 1 time in total.
Image

User avatar
phd21
Level 14
Level 14
Posts: 5029
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Remember window settings on close for next open?

Postby phd21 » Sun Jan 08, 2017 4:15 am

Hi "Seano123",

I am not using Linux Mint Mate edition, but I think there are two options.

Control Center>Personal>Windows>Placement>(check box) center new windows
http://alt.os.linux.mint.narkive.com/YftJ2Vth/window-placement-in-mint-17-2-mate

or
install "gDevilspie" from the Software Manager or Synaptic Package Manager (SPM), and use it.
https://launchpad.net/gdevilspie

Hope this helps ...
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Seano123
Level 1
Level 1
Posts: 38
Joined: Sun Jan 08, 2017 2:04 am

Re: Remember window settings on close for next open?

Postby Seano123 » Sun Jan 08, 2017 4:41 am

Thank you for such a quick reply, Phd21. I'm afraid that the first option does not remember the window placement, but centres them all, like with a fresh install, and I ran apt-get for gDevilspie, and it hasn't been able to start, due to not being in the PATH, which would require a bit of tweaking. Not being familiar with the software, I might let it pass because things are almost perfect right now, and don't want to have to spendf another two weeks setting everything up again if I break something with some software I don't really know.

Not to worry though. If MATE is not capable of remembering where the windows for the usual apps are meant to go, then I guess I'll just give it a little black mark and look at the option of changing to one of the other window managers sometime down the line. It is not a critical error, but just annoying having to replace all the windows everytime I have to open them.

I will keep my eyes on this page in case there maybe any other solutions. It seems strange because Debian and Ubuntu used to be able to remember the window placements between sessions with Gnome back in the past decade. I would have thought that there was some tickbox in Compiz, but don't want to experiment too much with that on the only system I have to work with right now.
Thanks for your help, sir.
Image

User avatar
phd21
Level 14
Level 14
Posts: 5029
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Remember window settings on close for next open?

Postby phd21 » Sun Jan 08, 2017 5:09 am

Hi "Seano123",

You are welcome.

There maybe other settings for this available somewhere, I just have not booted to the newer Mate edition yet to find out. Maybe even a desklet, applet, or widget...

In my Linux Mint KDE, I just right click an application's window titlebar -> More Actions -> Special Application or Window settings, and I can easily set many options including to remember the window's position, size, which monitor screen, which workspace (virtual desktop), etc...
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Seano123
Level 1
Level 1
Posts: 38
Joined: Sun Jan 08, 2017 2:04 am

Re: Remember window settings on close for next open?

Postby Seano123 » Sun Jan 08, 2017 5:28 am

phd21 wrote:... to remember the window's position, size, which monitor screen, which workspace (virtual desktop), etc...


Thanks again, mate. That is what I am looking for. I have since found a solution to my second and last gripe with MATE; maximisation when I move a window to the top of the screen, by browsing through every thread in the MATE section until I found a solved problem relating to 'maximisation at the edge of screen', and it worked perfect with around 30 seconds effort - simple as that!

At least I can be hapy that one of my problems is overcome now, and the best part is, if I have to continue to put up with all my windows opening in the centre or top left every time, at least now I can swish them around to their rightful places on my desktop without having to be so careful not to accidentally maximise them.

I still hope I can find an answer to this minor issue, but now that I have stopped that annoying maximisation, it is much faster to rearrange the windows on my desktop every time I open them.

Thank you very much for your persistence and all your kind help, Phd21. Have a wonderful Sunday.
Image

User avatar
Minterator
Level 5
Level 5
Posts: 564
Joined: Thu Jan 10, 2013 8:29 am

Re: Remember window settings on close for next open?

Postby Minterator » Sun Jan 08, 2017 11:33 am

Some apps "remember" the last window size & position, most don't. Well-written apps should, it's NOT up to MATE to do that.

If you absolutely want your desktop apps restored exactly as you had them before, use wmctrl or xdotool to set app windows to any size/position. You'd have to write a script that searches for windows by name and resizes/repositions them.

xdotool search ...
xdotool windowmove ...
xdotool windowsize 79691799 50% 95%

or combine in one line, e.g.
xdotool windowmove $(xdotool search --name "App Title") 500,600,
Mint 17.3 MATE, kernel 4.11.12

User avatar
phd21
Level 14
Level 14
Posts: 5029
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Remember window settings on close for next open?

Postby phd21 » Sun Jan 08, 2017 3:07 pm

Hi "Seano123",

You are welcome.

I may have found a way for you to tell your Linux Mint Mate 18.1 system to remember windows placement settings, and other windows settings. I created a bootable USB flash drive stick of the Live test drive installation version of Linux Mint Mate 18.1 to look for possible options for this, and to check it out. I like it.

In the Control Center, click the Compiz Settings Manager, and there are numerous options available, see screenshots below. Because changes do not save when you are running a Live installation version of Linux Mint from a USB version (without persistence), I cannot verify if this works. So, you will have to try it for yourself, or perhaps someone else that has a fully installed version of Linux Mint Mate 18.1 and is more familiar with the Compiz Settings Manager could help you more. Maybe there are online tutorials as well.

In my KDE system these are stored as Windows Rules. But, I think the Mate Compiz "Place Windows" option or perhaps "Windows Rules" or both is where you would do this. Bring up an application like Firefox and place it wherever you want and resize it, then go into the Mate Compiz "Place Windows" option, click the "Fixed Windows Placement" tab, click the "+" to add a new Window Placement Rule, the "Edit Match" pop-up window appears, "Type" I think should be "Window Class"?, click the "Grab" button which turns into a cross hair pointer, and click the application (like Firefox titlebar) for this rule and it will enter in the application's name. If need be you can edit that to change the actual position coordinates. Then close the application, and restart it and see if it remembers the position and size, etc... You may even need to logout or restart after making these changes.

Compiz
http://wiki.compiz.org/Plugins/Place

Linux Mint website - See links for user guide, release notes, etc...
https://linuxmint.com/rel_serena_mate.php

Mate/Compiz Windows always open under Mate panel.(SOLVED)
https://forums.linuxmint.com/viewtopic.php?t=228853

ArchLinux - Compiz
https://wiki.archlinux.org/index.php/Compiz

Slightly older article
Linux Mint 17.1 finally makes MATE's fancy Compiz graphics easy to use
http://www.pcworld.com/article/2851078/linux-mint-171-finally-makes-mates-fancy-compiz-graphics-easy-to-use.html

Older article but might have some useful info
Configuring the Mate Desktop to Make it More Visually Appealing
https://community.linuxmint.com/tutorial/view/1395


Good Luck and keep us posted on your progress.

Hope this helps ...

Screenshot at 2017-01-08 17-42-05_copy.jpg


Screenshot at 2017-01-08 17-51-19_copy.jpg


Screenshot at 2017-01-08 17-51-42_copy.jpg
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Seano123
Level 1
Level 1
Posts: 38
Joined: Sun Jan 08, 2017 2:04 am

Re: Remember window settings on close for next open?

Postby Seano123 » Mon Jan 09, 2017 2:11 am

Thank You very much for your help, Minterator and Phd21. I really appreciate your time and help with this minor issue. I am probably a bit sentimental, and also like to concentrate my mind 100% on the jobs I am doing, and expect my system to conform to my own old-fashioned ways, ala GNOME2-style, without surprise distractions..

I like my browser and any major applications to open on the left at the top, my file manager (Caja currently which I slim down vertically to be a tall, slim window), on the right at the top, and then my text editor (Xed) and terminal window to both cascade at the right on the bottom. That is the way I have been doing it since 2009 when I finally ditched Win98 as the desktop and first used Linux (which I had used for 10 years as a server OS) as a GUI desktop on the client. It tends to become habitual after a while.

It is not a major problem, Just a minor annoyance when my 'utilities' forget their previous placement and have to be moved from left to right every time I open them.

I was hoping Husse would have an answer off the top of his head, but now I can see why he doesn't, because nor do I. I have tried your Compiz instructions this morning, Phd21, and looked around at all the Window options in Compiz, but still no success. I have also read carefully the list of options for wmctrl amd xdptool, Minterator, and could not find anything in either which would seem to do what I hope to achieve in the old-fashioned, retrospective GNOME2 way that I have loved for so many years now. It seems that there is no simple tickbox that I could untick to stop MATE from interfering when it's not wanted, and after having gone through the rigmarole of downloading another Mint distro with Cinnamon, then trying Ubuntu 16.04 which I had lying about on a backup drive, and finally Elementary GNOME which I also had on that drive from goodness knows how long ago, I have come to the conclusion that MATE may not be perfect, but it is the closest thing to GNOME2 which I am likely to find today, and lacking a time machine to take me back to 2010, it is the best I can do.

MATE is 99% right. I am going to try to concentrate on being less pedantic and more grateful for all that I have, and not worry about that 1% I don't have anymore, because it has already cost me a Monday morning, to no avail, and Now I will have to change the defaults in the GRUB menu to get this nice neat custom MATE distro to boot when I am boiling the kettle and not at the kbd to scroll through the list.

I thank you both for your help, and sorry for asking the impossible. I guess that is just the way this world is going lately. Good luck with your next fussy newbie here on the Mint forum, good fellows.
Image

User avatar
Minterator
Level 5
Level 5
Posts: 564
Joined: Thu Jan 10, 2013 8:29 am

Re: Remember window position on close for next open?

Postby Minterator » Mon Jan 09, 2017 10:10 am

Open a Terminal and Calculator. In terminal paste this command:

Code: Select all

xdotool windowmove $(xdotool search --name "Calculator") 100 400


This will move the Calculator window to coordinates x=100 y=400. Then run the command with different coordinates, e.g. 500 500 to move that window again. You can have a startup command with a 30 sec delay that will position your apps any place you want. Your script will need one windowmove line for each app you want to move, and one windowsize line for each app window you want to resize.
Mint 17.3 MATE, kernel 4.11.12

Seano123
Level 1
Level 1
Posts: 38
Joined: Sun Jan 08, 2017 2:04 am

Re: Remember window position on close for next open?

Postby Seano123 » Mon Jan 09, 2017 8:00 pm

Thanks again Minterator. I am not all that keen on using such a method because I presume that this would mean using scripts with icons in the panel in some way to call each different application, wait 30 secs and then move them to their prededined positions. It's rather cumbersome and I reckon that by the time I got around to then adding the icons that each application currently uses in the panel to the different scripts, it is more than likely that Mint 18.2 will be released and they will have fixed this problem with window positioning.

I have come to the conclusion that what I was wanting to achieve here is impossible with MATE. Sorry to bother you with this impossible quest. Now I know better. Maybe it's time to change to KDE? Phd21 has mentioned that KDE can remember window placement between loadings so I might have to look into that sometime in a week or so when I can afford the cost of the download.
Image

ben2talk
Level 2
Level 2
Posts: 69
Joined: Tue Jun 28, 2011 12:46 am

Re: Remember window settings on close for next open?

Postby ben2talk » Tue Jun 27, 2017 1:21 am

phd21 wrote:Hi "Seano123",

I am not using Linux Mint Mate edition, but I think there are two options.

Control Center>Personal>Windows>Placement>(check box) center new windows
http://alt.os.linux.mint.narkive.com/YftJ2Vth/window-placement-in-mint-17-2-mate

or
install "gDevilspie" from the Software Manager or Synaptic Package Manager (SPM), and use it.
https://launchpad.net/gdevilspie

Hope this helps ...


Thank you - it helped me running Cinnamon 18.1
I had an issue with OpenPHT (Plex media player) always returning to the centre - when I hit '\' to take it out of full-screen mode mostly when I'm multitasking and want to leave a TV program playing for my son...

Now it 'restores' to a 1/4 top left of screen with no decoration. Brilliant!

I heard about Devilspie a long time ago, but long forgot about it... just 'apt install devilspie gdevilspie' worked fine here.

User avatar
weyland
Level 1
Level 1
Posts: 42
Joined: Tue Feb 24, 2015 8:44 am

Re: Remember window position on close for next open?

Postby weyland » Tue Jun 27, 2017 10:12 am

I can recommend devilspie. Could no longer work without it. I use it mostly to put various applications and/or Chrome instances in the right workspace (I use eight). It doesn't really remember where windows were or how big, but it does remember where you previously told it to put them, in a simple profile/config file.

Hoser Rob
Level 9
Level 9
Posts: 2888
Joined: Sat Dec 15, 2012 8:57 am

Re: Remember window settings on close for next open?

Postby Hoser Rob » Tue Jun 27, 2017 12:46 pm

Seano123 wrote:
phd21 wrote:... to remember the window's position, size, which monitor screen, which workspace (virtual desktop), etc...


Thanks again, mate. That is what I am looking for. ..


I used to use KDE and I still like it, but if you installed the Mate version because it's better for low power machines then KDE may not be optimal. It isn't as taxing as Cinnamon but it's up there.

The main reason that light Linux DEs are light in the first place is that they have fewer features and eye candy. If you start adding plugins and eye candy it isn't so light anymore, which defeats the purpose of a light DE in the first place.

User avatar
aamigal
Level 1
Level 1
Posts: 4
Joined: Sun Dec 11, 2016 3:32 pm
Location: Germany

Re: Remember window settings on close for next open?

Postby aamigal » Fri Oct 27, 2017 5:46 pm

phd21 wrote:
install "gDevilspie" from the Software Manager or Synaptic Package Manager (SPM), and use it.
https://launchpad.net/gdevilspie

Hope this helps ...


This hint is very useful for me - some programs didn't use the "center setting" and they start in the upper or lower left corner of the screen.

Now I have proper windows on my screen. Helps a lot ... !!! :D


Return to “MATE”