Linux: Auto-type fails under some circumstances

Steve W
2014-05-22
2014-07-13
  • Steve W
    Steve W
    2014-05-22

    I am running KeePass 2.26 in Arch linux and Ubuntu. I have set up a global auto-type key in openbox so that crtl-alt-a calls keepass --auto-type. This all worked fine in KeePass 2.24 and earlier but I have a problem with 2.25 and 2.26. If the database is already unlocked and only a single entry matches the window in focus then only the first character of the username is sent to the correct the field, all other characters seem to go to some other window. If multiple entries match the window in focus so that one entry needs to be selected by the user, then everything works normally.

    This does NOT seem to be a mono issue, I tried rolling back to several older versions of mono with no change in behavior.

    Any ideas?

     
  • Paul
    Paul
    2014-05-23

    Make sure you are not using TCATO.

    cheers, Paul

     
  • Steve W
    Steve W
    2014-05-23

    TCATO is not enabled for any of my entries.

     
  • Paul
    Paul
    2014-05-24

    There is a new key sending engine in 2.25.
    Try the Auto-Type on the KeePass test page.

    cheers, Paul

     
    • Steve W
      Steve W
      2014-05-31

      It fails in the same way on the test page.

       
  • Dirk
    Dirk
    2014-05-31

    I also have big trouble with autotyping using keepass 2.25 and xdotools under Ubuntu 14.04LTS. Every third or forth time, the CTRL-V brings good results. Mostly the focus gets lost and the info is pasted wildly around. I did a test with USER=user name and PASSWORD=password without defining any additional AUTOTYPE sequence and tried the keepass testpage and gedit as the destination.
    Mostly the 'u' from username is pasted and the rest goes somewhere else. Sometimes also an additional 'D' get's posted. Windows are switching around and menues pop up. It looks as if the characters are pasted together with control keys (e.g. ALT key).

    I was also playing around with the settings, but did not find any item, that brings a better result.

    I never had problems with keepass 2.24 and earlier versions.

     
  • Steve W
    Steve W
    2014-06-01

    @Dirk - Sounds like the same symptoms I am having. Can you confirm that if you add a second entry that matches the current window so that you have to choose between the two, everything works as expected?

    I have now also tested this in Xubuntu 14.04 running XFCE desktop and keepass 2.25 with exactly the same problem.

     
  • Dirk
    Dirk
    2014-06-01

    @Steve - I'm not using the global ctrl-alt-a key. I only use CTRL-V from keepass. I don't understand the function of global key and do not want to past wrong passwords to another site.

     
  • Steve W
    Steve W
    2014-06-20

    Any ideas on the best workaround for this since auto-type is not working in linux? I also use keepass on Windows 7 and I have that at version 2.26 as well. Would it be safe to leave Windows running 2.26 and share the same database with my linux system running 2.24 where auto-type works?

    Or is there any chance that KeeFox or some other plugin would function correctly in spite of the problem with auto-type? Would that be a better temporary solution?

     
  • Paddy Landau
    Paddy Landau
    2014-06-21

    I have been getting the same intermittent result on Ubuntu 14.04 (as with Dirk).

    To mitigate (but not solve) the problem, I have set KeePass to cancel auto-typing when the focus changes:

    Tools > Options > Advanced > Auto-Type
    Check both "Cancel auto-type when the target window changes" and "Cancel auto-type when the target window title changes".

    This prevents, in Dirk's words, "the info is pasted wildly around."

     
  • Dominik Reichl
    Dominik Reichl
    2014-06-21

    Thanks for reporting this issue. I've now improved the releasing of key modifiers.

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_140621.zip

    Best regards,
    Dominik

     
  • Steve W
    Steve W
    2014-06-21

    Thanks, Dominik. The snapshot above does seem to fix the problem for me.

     
  • Dirk
    Dirk
    2014-07-10

    Version 2.27 is still not working for me. Sometimes only the last character gets lost, sometimes AutoType (CTRL-v) is going complete silly. I am now back on version 2.24, because this is the last really good version. Does anyone know where to get or how to build 2.24 for Ubuntu 14.04LTS? I tried to use the portable windows version KeePass.exe, but this only runs, if KeePass.exe.config is also available in the same directory. This does not match with /usr/bin/keepass2.

     
  • Paul
    Paul
    2014-07-10

    You can copy the files from the portable version over the top of the version you have installed.

    cheers, Paul

     
  • paul breitner
    paul breitner
    2014-07-12

    I was also having issuses with auto-type under openbox.

    Problem:
    Autotype filled the first character and then send the rest of keypresses to some random windows. Sometimes it even managed to spawn new windows. In 90% of the cases i ended up with a "locked" desktop. I was still able to move the mouse, but clicks hat no effect at all. The only possible interaction was pressing the esc key, which resulted in switching windows. Pretty weird.

    Here is how i solved it:

    checked:
    "Cancel auto-type when target window changes" and
    "cancel auto-type when target window title changes"
    that prevented the desktop from locking, but still spawned a new window after the first character got filled.

    downgraded to 2.24:
    autotype worked as expected.

    and now the weird part. upgraded to 2.26 again:
    everything works just fine.

    Additionally Keepass somehow failed to recognize my keyboard layout (de). But only for a few entries while others just worked fine.
    I poked a little bit around and found the following behaviour using the sample entry and http://keepass.info/help/kb/testform.html:

    Username: zMichael321z
    pw: z1234z

    Result after autotype:
    yMichael321z
    z1234z

    It is weird that the first character does not get mapped correctly but the rest gets mapped as expected.

    I solved that by executing "setxkbmap de" or adding it to the openbox autostart.

    Edit:
    i just disabled
    "Cancel auto-type when target window changes" and
    "cancel auto-type when target window title changes"
    and everything is still working fine with 2.26

     
    Last edit: paul breitner 2014-07-12
  • Dirk
    Dirk
    2014-07-13

    I am back on 2.24 in Ubuntu 14.04, but here also some minor problems occur. Sometimes the @ character is not transferred, sometimes (more often), the copy ends with permanent pressed CTRL-key. This results in a not working interface. You can press CTRL once and everthing is fine again. It seems, that the interface for transferring characters in Linux is not very stable. The problems with V2.25 and newer also look as if CTRL is activated somewhere amid the AUTOTYPE sequence (windows switch or close, clicks on the desktop do not work).