Menu

#1413 keepass2 lock/close command line options not working on linux

KeePass_2.x
closed
nobody
None
5
2015-12-23
2015-07-30
No

I'm on Ubuntu 15.04 with KeePass 2.29.

When I have an open KeePass database, I cannot lock or close it using a command line trigger. Running "keepass2 --lock-all" takes a couple seconds, and then it ends with no indication of errors. But my database is still open and unlocked.

I've made sure that all other windows in the database are closed; the only thing open is the primary database window (with all of the user entries). The command is running under the same user that opened the database (not using 'sudo').

Discussion

  • T. Bug Reporter

    T. Bug Reporter - 2015-07-31

    In reply to Paul's comment on Bug 1412:

    Works for me on Ubuntu 14.10. I used this command:
    mono KeePass.exe -lock-all

    cheers, Paul

    Are you saying that single dash works, but double dash doesn't -- or that the invocation of KeePass must be prepended with an explicit invocation of mono -- or both?

     
  • Stephen Schrauger

    For me, neither single or double dash worked. And I tried running "mono /usr/lib/keepass2/KeePass.exe -lock-all", but that didn't help.

    Similarly, the 'keepass2' command links to 'exec "/usr/bin/cli" "/usr/lib/keepass2/KeePass.exe"'. Copying that command and running it with the lock flag didn't help either.

     

    Last edit: Stephen Schrauger 2015-07-31
  • Paul

    Paul - 2015-08-02

    Does KeePass run if you use "mono /usr/lib/keepass2/KeePass.exe"?

    cheers, Paul

     
    • Stephen Schrauger

      Yes, it runs if I open it via mono. It's just the locking flag that ends up doing nothing.

       

      Last edit: Stephen Schrauger 2015-08-03
  • Paul

    Paul - 2015-08-03

    Do you have KeePass set to single instance? Tools > Options > Advanced, Start and Exit.

    cheers, Paul

     
    • Stephen Schrauger

      I don't remember activating the "Single Instance" preference, but it was checked (strange, because I could open multiple instances anyway). I unchecked it, then couldn't open my database! A reboot later, and it opened just fine.

      Unfortunately, changing that preference did not alter the outcome of '--lock-all'.

       
  • Paul

    Paul - 2015-08-04

    Having single instance set and being able to open multiple KeePass tells us that KeePass is unable to communicate within Ubuntu, so you wouldn't expect -lock-all to work. It may be mono or Ubuntu, try re-installing mono.
    What mono version do you have?

    cheers, Paul

     
    • Stephen Schrauger

      I'm running mono version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu4). I tried both removing and purging 'mono-complete' and reinstalling. I don't want to remove mono-* since that would force me to uninstall way too many essential packages.

       
  • Dominik Reichl

    Dominik Reichl - 2015-12-23

    I cannot reproduce this issue under Ubuntu 15.10 with KeePass 2.30.

    Maybe it was a problem in the file system watcher of Mono that has been fixed in the meanwhile. Or maybe KeePass couldn't access the temporary directory for some reason.

    Best regards,
    Dominik

     
  • Dominik Reichl

    Dominik Reichl - 2015-12-23
    • status: open --> closed
     

Log in to post a comment.