How to reset default window positions and sizes?

6,818

Solution 1

I found this answer while doing some research into your problem and I thought that it might be of use as while it wont reset the default permissions it will allow you to choose the size of the window when the program is opened.

Solution 2

General solution:

Using the dconf editor (the GUI one, via the dconf-editor package on ubuntu and similar, is most convenient, though the command line one via dconf-cli probably will work too) search for the relevant settings. For GTK standard dialogs such as the file chooser, color chooser, etc, they are likely located in org/gtk/settings, and for standalone applications, they are likely located in org/gnome.

Different applications store their settings in different ways so your mileage may vary, but try looking around in there for the application (or vendor thereof) you are using, and see if you can find a key relating to window size.

I fixed my problem by setting org/gtk/settings/file-chooser/window-size to (800, 600), and the next time I used the open-file dialog, it had the requested size.

Here's what I was doing:

I use X11 forwarding on a remote server for home development and somehow the open file dialog was resized to a very large size, such that it exceeded the size of the monitors upon which I do my work, and I was thus unable to navigate the GUI easily, having to use it by keyboard shortcuts only. This was annoying, but not annoying enough to do something drastic to fix, so it persisted for years (as you cannot resize this dialog via ordinary means when using X11 forwarding on xming). Every so often it would frustrate me and I would search the internet for a solution about how to fix it, finding this and other questions like it on stackoverflow, but with no applicable answers.

Share:
6,818

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    Short Version

    How do you reset the default window positioning and sizing rules? As in, when an application starts, it remembers its last position and size. I want it to not do that, and start in whatever position it would have started in a fresh install.

    Is there a list somewhere that I can just delete (or modify)?

    System info

    Ubuntu MATE 16.04 LTS, using Compiz

    Long Version and Explanation

    My reason for asking is probably a little weird. I have an application (specifically, Kerbal Space Program) that has started crashing immediately on load. I had been tweaking the keyboard shortcuts within the game, and accidentally set one to one of Compiz's window resize shortcuts that I never use (mea culpa) and when I used it the game immediately crashed. Ever since then, it won't load at all.

    Answers to questions before you ask them:

    "This sounds like a bug in KSP and is therefore not relevant here" You're probably right, but I can't rewrite the game's code. I have multiple versions of the game installed, and they're all giving me exactly the same problem. So wherever the problem is, it's not anywhere in the game's local files, because those are all separate. I think it's a case of KSP not responding intelligently to a situation it didn't expect.

    Basically, I have a suspicion that if I can reset the default window size, the problem will go away, which is why I'm asking this here.

    "Is KSP giving any helpful error messages?" No.

    "Is KSP giving any unhelpful error messages?" No.

    "Surely you've tried this in other window managers?" Indeed. Same problem in Compiz and Marco. I haven't tried installing any others.

    "Does it work in other user accounts?" Like a dream. I have all my KSP installs on a separate drive, so they're accessible for my test user -- and it loads just fine.