Menu

Main window keeps growing until maximized?

Help
2023-06-04
2023-06-05
  • Michael Brooks

    Michael Brooks - 2023-06-04

    I noticed that on Ubuntu 22.04.2 LTS my KeePass main window was always starting maximized. Even if I minimize and resize it, on next opening it would be maximized again. It's been like this for a while (months, at least), but today I searched these forums and found a very old post about a similar problem that was resolved by editing KeePass.ini. I poked around and found relevant looking entries in KeePass.config.xml. I edited a section to look like this:

        <MainWindow>
            <X>400</X>
            <Y>300</Y>
            <Width>620</Width>
            <Height>540</Height>
            <SplitterHorizontalFrac>...
    

    I then opened KeePass (by running mono opt/keepass/KeePass.exe) and was pleased to see that the main window opened at a more reasonable size. However, when I exit from KeePass and check the KeePass.config.xml file, it has changed to this:

       <MainWindow>
            <X>400</X>
            <Y>300</Y>
            <Width>795</Width>
            <Height>723</Height>
            <SplitterHorizontalFrac>...
    

    Sure enough when I re-run KeePass in the same way, the main window is larger than I left it. So I exit again and check the config file to see this:

        <MainWindow>
            <X>400</X>
            <Y>98</Y>
            <Width>1020</Width>
            <Height>972</Height>
            <SplitterHorizontalFrac>...
    

    Going round the loop again I arrive at:

        <MainWindow>
            <X>400</X>
            <Y>27</Y>
            <Width>1309</Width>
            <Height>1043</Height>
            <SplitterHorizontalFrac>...
    

    And again:

        <MainWindow>
            <X>400</X>
            <Y>27</Y>
            <Width>1309</Width>
            <Height>1043</Height>
            <Maximized>true</Maximized>
            <SplitterHorizontalFrac>...
    

    When I re-open KeePass now the window is back maximized. Further re-runs of KeePass leave the config in this state. Any clue why the config values grow in size after I exit KeePass? Is there a workaround? Thanks in advance for any help.


    $ mono --version
    Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-3.2 Wed Jun 30 05:34:49 UTC 2021)
    ...
    
    $ mono opt/keepass/KeePass.exe --version
    KeePass 2.54
    Copyright © 2003-2023 Dominik Reichl
    
     
  • Paul

    Paul - 2023-06-05

    mono must be mis-reporting the window size and KeePass is simply writing that information to the config file.
    A workaround is to set the values in the enforced config file.
    https://keepass.info/help/kb/config_enf.html

    cheers, Paul

     
  • Michael Brooks

    Michael Brooks - 2023-06-05

    Thank you - setting width and height in the enforced config file is working.

     

Log in to post a comment.

MongoDB Logo MongoDB