Changing BaseX GUI preferences is not restored after restart

Monday, 13 December 2021 · 3 messages
KK
Kristian Kankainen13 Dec 2021 13:08 #
Hello, I have a strange behaviour with BaseX on MacOS X. I have multiple downloads of BaseX ZIP edition on my mac. They are in different folders. When I start the BaseX GUI from one of these folders (either with opening the basex.jar or running the bin/basexgui script) and inspect the Preferences General tab, I see the Database and Repository paths stating the wrong paths. Trying to open a database yields in a message stating there are no databases and asks whether I want to create one (I choose not to). If I choose the correct paths to the database and repository folders and choose quit from the menu and start the GUI again, then the values have been reverted to the old and wrong ones. Is there a way I can change these paths? Best regards, Kristian Kankainen
CG
Christian Grün13 Dec 2021 13:17 #
Hi Kristian,
Quoted text · Kristian Kankainen · 1 line
> If I choose the correct paths to the database and repository folders and choose quit from the menu and start the GUI again, then the values have been reverted to the old and wrong ones.
The BaseX configuration is stored in a .basex file, either a global one in your home directory or a local one in your project directory [1]. If you change the setting in the preferences tab and close BaseX, the .basex file should be updated. If that’s not the case, I wonder if it’s a permission problem. You could start the BaseX GUI with the -d flag on command line and check what’s output when BaseX is closed. It could also be a Java/Mac issue: Does it make a difference if you close BaseX via the close icon or the menu item? If we don’t manage to find the culprit, you can always edit the correspondig .basex file manually. Hope this helps, Christian [1] https://docs.basex.org/wiki/Configuration
KK
Kristian Kankainen13 Dec 2021 14:44 #
Great! Changing the local .basex file in the same folder solved the issue. This also made new changes in the GUI preferences pertinent as they are now saved to the same .basex file. I am not able to debug further why the changes were not saved or if they were, then in which file they were saved. Thank you very much, Christian! Best regards, Kristian Kankainen
Quoted text · Christian Grün · 24 lines
> On 13. Dec 2021, at 14:17, Christian Grün <christian.gruen at gmail.com> wrote: > > Hi Kristian, > >> If I choose the correct paths to the database and repository folders and choose quit from the menu and start the GUI again, then the values have been reverted to the old and wrong ones. > > The BaseX configuration is stored in a .basex file, either a global > one in your home directory or a local one in your project directory > [1]. If you change the setting in the preferences tab and close BaseX, > the .basex file should be updated. > > If that’s not the case, I wonder if it’s a permission problem. You > could start the BaseX GUI with the -d flag on command line and check > what’s output when BaseX is closed. It could also be a Java/Mac issue: > Does it make a difference if you close BaseX via the close icon or the > menu item? > > If we don’t manage to find the culprit, you can always edit the > correspondig .basex file manually. > > Hope this helps, > Christian > > [1] https://docs.basex.org/wiki/Configuration

⚡Generated with XQuery