Open priv opened 5 years ago
We just pass the command off to the system to execute. It might be a mistake, but in your example you forgot to include the OneDrive folder after the %USERPROFILE%.
Yes this is just an example, I copied by typing and made that mistake.
If I execute "%USERPROFILE%\OneDrive\Application\pietty.exe" from "Run" and it works too. I'll check keepassxc source and see if I can figure out why, thanks.
I did some debugging and docs reading, looks like this is a Qt issue. There is no function that expands env vars prior to program execution. I wrote a proof of concept that worked and will weaponize it tomorrow in a PR. Good report, thank you!
Has the PR been filed or is this just a very long night?
I think quite many of Keepass own "placehoders" (https://keepass.info/help/base/placeholders.html) are quite rarely used, but at least ENV variables and {ENV_DIRSEP} would be very nice on crossplatform usage when chain opening files. Relates kind of #477
I agree, this is also something that #3863 tried to introduce.
Currently, I'd really like to have my home folder as ENV variable so I can have the same database on my work laptop (LDAP credentials) and my private laptop/PC (my regular username). This would also be useful if I open stuff on my Android smartphone which has a completely different directory layout than proper Linux.
it would be nice to have expanded evnvar in "Backup destination" as well. I'd like to set that field in one of the following fortmat:
Would that be possible?
The tilde should work
it doesn't for me, could that be related to the fact I use the flatpak installation? IMO it doesn't because if I use the absolute path /home/crazybyte/.config/keepassxc/{DB_FILENAME}.old.kdbx
it works.
The following are the permission I set on flatpak:
[Context]
shared=network;ipc;
sockets=x11;wayland;ssh-auth;
devices=all;
filesystems=~/Nextcloud/Backups/Keepass;xdg-config/kdeglobals:ro;xdg-config/keepassxc;xdg-run/gvfs;
[Session Bus Policy]
org.freedesktop.secrets=own
org.freedesktop.Notifications=talk
com.canonical.Unity.Session=talk
org.kde.StatusNotifierWatcher=talk
org.kde.KGlobalSettings=talk
org.freedesktop.ScreenSaver=talk
com.canonical.AppMenu.Registrar=talk
org.gnome.SessionManager.Presence=talk
org.gnome.ScreenSaver=talk
org.kde.kconfig.notify=talk
org.gnome.SessionManager=talk
[System Bus Policy]
org.freedesktop.login1=talk
As you can see the flatpaked app has rw access to xdg-config/keepassxc
, which is where I'm storing the backup db.
I the ~
really works for you?
agreed it doesn't work. The error occurs here:
Expected Behavior
System environment variables should be supported to align with original KeePass2. The name of the variable enclosed in '%' characters should be expanded. For example %TEMP% is replaced by the user's temporary path. ref: https://keepass.info/help/base/autourl.html
Current Behavior
unable to use environment variable in cmd://
Steps to Reproduce (for bugs)
Context
Switch from KeePass2 but behavior is not the same
Debug Info
KeePassXC - 2.3.4 Operating system: Windows 10 CPU architecture: x64