Page 1 of 1

Change default window size when opened

Posted: Fri Nov 30, 2012 12:38 am
by jharris1993
First of all:
I discovered Mint/Cinnamon, when Linux Format crowned it King of the Distributions. Since I was becoming increasingly unhappy with where Ubuntu was heading, (The Twilight Zone?), I wanted a change. Mint 13 and now Mint 14 has now become my Linux of Choice - and I have discovered that many of my Linux pals, and even a few strangers, are making the switch.

Thanks for an excellent distribution!

Second:
Please accept my apologies if this question has already been asked. After about fifteen minutes searching the Web and the various Mint fora, I have not yet found an answer.

Issue:

When I open any window, for any application, within Mint 13 or 14, the window always opens in "full screen" mode, completely covering whatever was there on the screen.

If I take a window out of full screen mode, close it, and then re-open it, it again returns to full-screen mode.

I opened gconf-editor, went to desktop ==> cinnamon ==> windows since several articles said that window specific settings were found here. In my case there was only one entry: Theme - MintX

How do I:
1. Get the windows to open at a reasonable size, instead of full-screen mode.

2. Get the windows to remember last-placed position and dimensions when closed.

Thanks again for a wonderful distribution.

Jim (JR)

Re: Change default window size when opened

Posted: Fri Nov 30, 2012 5:19 pm
by remoulder
jharris1993 wrote:window always opens in "full screen" mode
Do you have maximus (check in synaptic) or the maximus applet (check in Cinnamon settings) installed? If so remove/disable it.

Re: Change default window size when opened

Posted: Wed Dec 19, 2012 5:44 am
by HealingTek
I have this same problem since installing Mint 14. No maximus package or applet is installed. It's driving me a bit nuts. Any suggestions on how to get it to stop doing this?

Ideally I'd really like windows to open with the same geometry as they were at when last closed, but I'd settle for at least not being maximized.

Re: Change default window size when opened

Posted: Wed Dec 19, 2012 6:57 am
by te7
I also find this annoying. A solution would be nice.

Re: Change default window size when opened

Posted: Fri Dec 21, 2012 10:00 pm
by herbie643
My sentiments exactly. Firefox, sending a link from Firefox cause maximized windows.
Hope a solution is forthcoming.

Re: Change default window size when opened

Posted: Mon Mar 11, 2019 6:19 pm
by frisket
Nope. I just installed Mint 19 and the problem is still there. Almost all applications open maximised by default and there seems to be no way to stop it.

Who would be the person responsible for this: obviously not an application developer, someone working on the OS.

Re: Change default window size when opened

Posted: Tue Mar 12, 2019 8:15 am
by jharris1993
remoulder wrote:
Fri Nov 30, 2012 5:19 pm
Do you have maximus (check in synaptic) or the maximus applet (check in Cinnamon settings) installed? If so remove/disable it.
Nope. At least not explicitly. Is it installed by default? ("Default" of the distribution package maintainer? :wink: )

My installs are always pure stock installs with the following exceptions:
  • I set the logon type to "automatic login".
  • I install a few, (IMHO), essential system utilities like gddrescue, gparted, Grub customizer, and Kuser.
  • I change the time display in the taskbar from 24 hour time to 12 hour time and the date format from the European date order to the US date order.
  • Depending on what I am doing with a particular install, I may also install Clam / the Clam desktop interface and/or the printer driver for my HP Officejet Pro 6970 Multifunction Printer.
Except for these changes, the installations are stock desktop installs. No LAMP stack, no roving eyeballs, no Energizer Bunnies, etc.

As I recall, the behavior of windows is the same before and after these changes are made.

Re: Change default window size when opened

Posted: Wed Mar 13, 2019 2:25 am
by smurphos
Unless a window size geometry is explicitly set by the application the default behaviour for Cinnamon/Muffin is to open in the same state as when the window was last closed. So Close a browser maximised it will re-open maximised. Close it windowed it will reopen windowed.

Re: Change default window size when opened

Posted: Wed Mar 13, 2019 5:41 am
by jharris1993
smurphos wrote:
Wed Mar 13, 2019 2:25 am
Unless a window size geometry is explicitly set by the application the default behaviour for Cinnamon/Muffin is to open in the same state as when the window was last closed. So Close a browser maximised it will re-open maximised. Close it windowed it will reopen windowed.
Smurphos,
In my original posting, I said:
When I open any window, for any application, within Mint 13 or 14, the window always opens in "full screen" mode, completely covering whatever was there on the screen.

If I take a window out of full screen mode, close it, and then re-open it, it again returns to full-screen mode.
Though I don't remember testing this any time recently, others have confirmed that this behavior still exists in versions up to the current 19.1 version.

So, what happens is that if a window is closed in a size less than maximized - (i.e. The windows has been resized.) - when you re-open the window, it re-opens fully maximized again.

Re: Change default window size when opened

Posted: Wed Mar 13, 2019 3:25 pm
by smurphos
jharris1993 wrote:
Wed Mar 13, 2019 5:41 am
So, what happens is that if a window is closed in a size less than maximized - (i.e. The windows has been resized.) - when you re-open the window, it re-opens fully maximized again.
I can't reproduce that behaviour, and have never come across it as an issue myself (Cinnamon 18 through to 19,1). It works for me as I describe. Is this any particular application(s) or in general?

I suspect that people suffering this issue have root owned files in their home as most apps store last state geometry in local config files.

Code: Select all

sudo chown -Rc $USER:$USER $HOME
will fix that.

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 2:58 am
by jharris1993
Assuming a stock install, how would that happen?

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 3:16 am
by catweazel
jharris1993 wrote:
Thu Mar 14, 2019 2:58 am
Assuming a stock install, how would that happen?
More than likely by executing GUI applications as root that shouldn't be run as root.

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 7:59 am
by jharris1993
Yep.

Silly me, I gotta stop running those GUI apps.

You know, useless stuff like Gparted, kuser, Synaptic, update manager and - God help me - that damned root terminal. It'll get you every time! :shock: :wink:

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 8:39 am
by smurphos
The problem is when you use a plain sudo to run a GUI app from the terminal. Using polkit or the now deprecated gksudo was OK. A plain sudo runs the app as root but with the user's $HOME which is where things can start going a bit strange.

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 2:00 pm
by jharris1993
Smurphos,

Let me clarify this for everyone out there in our Television Audience. . . :wink:

I have two terminal window launchers set up. One is a normal, plain-vanilla terminal the way they normally work. The other is the exact same thing except that instead of something like "terminalcommand" I substitute "gksu terminalcommand" - which gives me a terminal that starts as a root terminal - after I enter my credentials.

In the same way, I have two file-manager launchers. One is the plain vanilla file-manager - "file-manager %U" and a special "root" file manager "gksu file-manager /" that runs a privileged file manager instance, beginning in the root of the file system.

I do this because 99.9999999. . . .99999999. . . .99999% of the work I do in Linux is some kind of administrative task or file-system recovery task that always requires elevated privilege so that I can poke around in a damaged file system, modify system configuration files, delete "untouchable" hidden stuff like Windows virii - or run things like hdparm to modify and/or securely erase hard drives. (etc.)

Will running applications like these via gksu cause the problem we're discussing?
You mention that "gksu" is being depreciated - what is the replacement?

Thanks!

Re: Change default window size when opened

Posted: Thu Mar 14, 2019 2:50 pm
by smurphos
So gksu is a su/sudo wrapper - as-well as presenting a gtk dialog for authentication it also ran su / sudo with parameters to ensure that the target users $HOME was used and that the calling users ~/.Xauthority file ownership isn't inadvertently changed. In short it was a trouble free way to run GUI apps as root.

Unfortunately it was abandoned by it's developer in 2014 and soon after a security issue was disclosed that was never been patched. It wasn't major but never the less it was removed from the Debian repos and from Ubuntu 18.04 / Mint 19 onwards is no longer available.

Instead applications that have a genuine need to escalate privileges should ship a polkit rule so they can be run with pkexec, Alternatively files can be accessed with privileges using admin:// (e.g xed admin:///path/to/some/file) - this method still using polkit to authenticate.

More on polkit - https://wiki.archlinux.org/index.php/Polkit