Hi Dirk,
keepass2 is started via Exec=keepass2 in keepass2.desktop file; probably /bin/sh is not involved and so SSH_AGENT_PID is not set.
in this case use a wrapper-script.
--- 8< --- keepass.bash #!/bin/bash
source ~/.bashrc keepass2 --- >8 ---
and starat Keepass via.
Exec=/bin/bash /path/to/keepass.bash
It will be a real pain: /usr/share/applications/keepass2.desktop belongs to a debian package and is not expected to be modified, there are many such .desktop files for different applications... For me it doesn't look as an acceptable option.
And I still don't understand why I don't have such problems when I login to X locally (via SPICE)