Discussion:
[Slackbuilds-users] Strange problem with KeePass 2.39.1
Thomas Szteliga
2018-06-14 22:01:30 UTC
Permalink
Hello,

I've noticed a strange problem with KeePass.
I see now in the description, that's the portable version.
https://slackbuilds.org/repository/14.2/misc/KeePass/


This version will not save user settings by default.

So it won't remember the last opened file or any settings
changed by a user without write permissions
in /usr/lib/KeePass/Release/.

The problem is caused by `PreferUserConfiguration`
which is by default set to false in
`/usr/lib/KeePass/Release/KeePass.config.xml`


~~~
...
<PreferUserConfiguration>false</PreferUserConfiguration>
...
~~~

Changing value to true will fix the problem and users
will be able to have individual configs.


Found this bit related:
https://sourceforge.net/p/keepass/discussion/329221/thread/d8c595ac/
--
Best regards

Thomas Szteliga
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/
Shrivats
2018-06-15 05:52:55 UTC
Permalink
Hey,

That may be true only if you download the binary release. But in the
SlackBuild, we use the Source release and I don't include
KeePass.config.xml in the package at all.

There are a couple things you can do as an user, if you don't prefer
keeping the config xml globally:

* Pass the path to your local configuration file through the command line
argument: '-cfg-local:' and override defaults.
* Keep your local configuration file in `~/.config/KeePass`

I'll think about including this file for global configuration (In the
source, it's `true` by default)

Thanks,

Shrivats
Post by Thomas Szteliga
Hello,
I've noticed a strange problem with KeePass.
I see now in the description, that's the portable version.
https://slackbuilds.org/repository/14.2/misc/KeePass/
This version will not save user settings by default.
So it won't remember the last opened file or any settings
changed by a user without write permissions
in /usr/lib/KeePass/Release/.
The problem is caused by `PreferUserConfiguration`
which is by default set to false in
`/usr/lib/KeePass/Release/KeePass.config.xml`
~~~
...
<PreferUserConfiguration>false</PreferUserConfiguration>
...
~~~
Changing value to true will fix the problem and users
will be able to have individual configs.
https://sourceforge.net/p/keepass/discussion/329221/thread/d8c595ac/
--
Best regards
Thomas Szteliga
Thomas Szteliga
2018-06-15 07:44:59 UTC
Permalink
Post by Shrivats
That may be true only if you download the binary release. But in the
SlackBuild, we use the Source release and I don't include
KeePass.config.xml in the package at all.
There are a couple things you can do as an user, if you don't prefer
* Pass the path to your local configuration file through the command line
argument: '-cfg-local:' and override defaults.
* Keep your local configuration file in `~/.config/KeePass`
I'll think about including this file for global configuration (In the
source, it's `true` by default)
Hello Shrivats,

I did not use another binary, I used the source tarball
provided in the .nfo file.

I did some digging and now everything is clear, but I guess you'll
need to somehow embed the XML in the Slackbuild.

I tested this now, normally there is no
`/usr/lib/KeePass/Release/KeePass.config.xml`
after installation and normal usage, but if
a user with write access to `/usr/lib/KeePass/Release/`
runs KeePass once (for instance root) then this file is being
created there (`/usr/lib/KeePass/Release/KeePass.config.xml`)
and it has the problematic PreferUserConfiguration set to false
and from this moment on KeePass will ignore all congiguration
changes made by other users.

Just give it a try and run KeePass as root once and then
check if `/usr/lib/KeePass/Release/KeePass.config.xml`
and if you're able save any configuration changes
as a normal user.
--
Best regards

Thomas Szteliga
Shrivats
2018-09-30 10:55:36 UTC
Permalink
Hey Thomas,

I pushed an update for version 2.40 and included KeePass.config.xml in this
update. It's currently in pending queue and you can try it out once it's
uploaded.

Sorry for the late reply.

Thanks,

Shrivats
Post by Thomas Szteliga
Post by Shrivats
That may be true only if you download the binary release. But in the
SlackBuild, we use the Source release and I don't include
KeePass.config.xml in the package at all.
There are a couple things you can do as an user, if you don't prefer
* Pass the path to your local configuration file through the command
line
Post by Shrivats
argument: '-cfg-local:' and override defaults.
* Keep your local configuration file in `~/.config/KeePass`
I'll think about including this file for global configuration (In the
source, it's `true` by default)
Hello Shrivats,
I did not use another binary, I used the source tarball
provided in the .nfo file.
I did some digging and now everything is clear, but I guess you'll
need to somehow embed the XML in the Slackbuild.
I tested this now, normally there is no
`/usr/lib/KeePass/Release/KeePass.config.xml`
after installation and normal usage, but if
a user with write access to `/usr/lib/KeePass/Release/`
runs KeePass once (for instance root) then this file is being
created there (`/usr/lib/KeePass/Release/KeePass.config.xml`)
and it has the problematic PreferUserConfiguration set to false
and from this moment on KeePass will ignore all congiguration
changes made by other users.
Just give it a try and run KeePass as root once and then
check if `/usr/lib/KeePass/Release/KeePass.config.xml`
and if you're able save any configuration changes
as a normal user.
--
Best regards
Thomas Szteliga
Thomas Szteliga
2018-10-02 07:51:00 UTC
Permalink
Post by Shrivats
I pushed an update for version 2.40 and included KeePass.config.xml in this
update. It's currently in pending queue and you can try it out once it's
uploaded.
OK, thank you, I will try it :-)
--
Thomas Szteliga
Loading...