Menu

#1561 Keepass2 autotype on mono 4.x is broken

KeePass_2.x
closed
nobody
None
5
2018-04-23
2016-08-10
Poil
No

Hi,

I've upgraded Ubuntu from 14.04 to 16.04, Keepass2 autotype is no more working.
I've tried to upgrade Mono to latest (4.4.x from http://download.mono-project.com/repo/debian/), not better
I've tried to downgrade Mono and Keepass2 to the Trusty releases, autotype is working
I've tried to upgrade Mono to latest on Trusty, autotype is no more working.

So it seems to be something with Mono 4.x

Best regards

Discussion

1 2 3 4 > >> (Page 1 of 4)
  • Dominik Reichl

    Dominik Reichl - 2016-09-15
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2016-09-15

    I've tested KeePass 2.34 on Kubuntu 16.04; it works fine.

    Make sure that you have installed the xdotool package.

    Best regards,
    Dominik

     
  • Poil

    Poil - 2016-09-22

    We are 6 to have this configuration, we have xdotool and no it's not working :/

    In keepass :
    Add an entry
    Title : the name of a terminal where you can type something in, example "Terminal"
    User name : foo
    * Password : bar

    In the terminal :
    keepass2 --auto-type

    On mono 3.2.8 (and before) you will have : foobar "enter"
    On mono 4.x nothing

     
  • Paul

    Paul - 2016-09-22

    Is your hot key still defined? Instructions for creating a hot key are shown on this page.
    http://keepass.info/help/v2/setup.html#mono

    cheers, Paul

     
  • fwgs

    fwgs - 2016-09-22

    I have a related issue. Some auto-typed chars output wrong.
    'T' output '!', 'Q' output '&', '}' output '&'.

    xdotool key on those key works though. So I'm guessing the issue is not from xdotool, too.

    I am running KeePass2 2.32, mono 4.2.1 and xdotool 4.3.20150503.1 on ubuntu 16.04.1.

    @Paul >Is your hot key still defined?
    Yes, I've added the option --auto-type, no changes.

    Edit: just tried upgrading to KeePass2 2.34, but no luck, same bug.

     

    Last edit: fwgs 2016-09-22
  • Paul

    Paul - 2016-09-22

    That's a very odd character substitution.
    Can you create some test entries to Auto-Type just those characters?

    cheers, Paul

     
  • fwgs

    fwgs - 2016-09-22

    Okay, so I went with the whole extended ASCII table. Posted the result at http://pastebin.com/raw/4rvVw7g0.

    The first half gets buggy at times, the second half is fine.

    Edit: how about with the hex too ? http://pastebin.com/raw/9bs4PPUQ
    Edit2: because why not http://pastebin.com/raw/7rB57iPt

     

    Last edit: fwgs 2016-09-22
  • Poil

    Poil - 2016-09-22

    I've installed a fresh Kubuntu 16.04
    run Konsole: "apt install keepass2 xdotool"
    run keepass2, add an entry "Konsole" foo/bar
    run in the Konsole "keepass2 --auto-type" and nothing...

     
  • Paul

    Paul - 2016-09-23

    Can you run xdtool manually to see where it's going wrong?
    xdotool key #
    xdotool key A

    cheers, Paul

     
  • fwgs

    fwgs - 2016-09-23

    xdotool as a standalone still run without any issue, as I said in my first post.

     
  • Poil

    Poil - 2016-09-23

    Hi,

    This is working :

    poil@ubuntu:~# xdotool search --class konsole behave %@ focus getwindowname getwindowpid
    1568
    poil@ubuntu:~# xdtool key a
    apoil@ubuntu:~#
    poil@ubuntu:~# xdtool key A
    Apoil@ubuntu:~#
    poil@ubuntu:~# xdtool key a
    apoil@ubuntu:~#
    
     
  • Paul

    Paul - 2016-09-23

    @fwgs
    Can you test with keysyms? List of keysyms.
    xdotool key 0x0023

    @Poil
    Are you sure you have a KeePass Title that matches the window you are using?
    Create a KeePass entry that matches the konsole window you are using and then try: keepass2 --auto-type

    cheers, Paul

     
  • Poil

    Poil - 2016-09-23

    Yes and all is working when I downgrade Mono ...

     
  • Paul

    Paul - 2016-09-23

    So it's some kind on mono bug. Not a lot we can do about that.

    cheers, Paul

     
  • Poil

    Poil - 2016-09-23

    Hum, Dominik Reichl says it's working for him, but what test did he do ?

    I've already open a bug on mono project https://bugzilla.xamarin.com/show_bug.cgi?id=43362.
    But my level in C# is near zero, I'm unable to make a poc about this bug :)

     
  • Paul

    Paul - 2016-09-23

    Maybe a less recent version of mono.

    cheers, Paul

     
  • JN

    JN - 2017-05-22

    Goodness I am sick of bugs in Linux packages and, especially, of difficulty getting and keeping KeePass working. It's almost enough to drive one back to LastPass.

    Can anyone advise where we should report this mono bug, please?

     
  • JN

    JN - 2017-05-22

    Also, discovering which version of Mono one has installed is not at all easy. For, look at this:

    Does this mean I have version 4 installed, or 5? I think the answer is: 4. But where do I get a lower version - and which should I get - of Mono?

     
  • Poil

    Poil - 2017-05-22
    echo "
    Package: *mono*
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: *mono*
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: *keepass*
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: *keepass*
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: libdbus-glib2.0-cil
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: libdbus-glib2.0-cil
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: libdbus2.0-cil
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: libdbus2.0-cil
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: libgtk2.0-cil
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: libgtk2.0-cil
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: libglib2.0-cil
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: libglib2.0-cil
    Pin: release n=trusty
    Pin-Priority: 900
    
    Package: libnunit-cil-dev
    Pin: release n=xenial
    Pin-Priority: -10
    
    Package: libnunit-cil-dev
    Pin: release n=trusty
    Pin-Priority: 900" > /etc/apt/preferences.d/mono.pref
    
    # add PPA jtaylor-keepass-trusty & dlech-keepass2-plugins-trusty
    sed "s/xenial/trusty/g" /etc/apt/source.list > /etc/apt/source.list.d/trusty.list
    # perhaps you will need to pin-prio a -10 all other trusty 
    
    apt remove mono* libmono* --purge
    dpkg -l |grep ^rc | awk '{print $2 }' | xargs dpkg -P
    
    apt update
    apt install keepass2 keepass2-plugin-libdbus mono-devel
    
    # for Unity
    apt install keepass2-plugin-application-menu
    
    # for gnome & co
    apt install keepass2-plugin-application-indicator
    
     
  • JN

    JN - 2017-05-22

    Here's some good news.

    I have discovered that the version of Mono recommended by the Mono project for my distribution works (i.e. solves the autotype problem). Previously I had been messing around with - and perhaps at the time needed? - various betas and third-party builds (although admittedly I am still using a slightly custom version of the KeePass package itself - but I think the following will work even if one isn't).

    My distribution - and desktop environment - are: Mint 18.1 x64 Cinnamon. That version of Mint is based on Ubuntu Xenial a.k.a. Ubuntu 16.0.4. The version of Mono that is recommended for Xenial can be seen, and downloaded, here.

    Uninstalling previous versions of Mono might prove hard. It did for me. However, if you are patient and know what you are doing it should be doable. I managed it.

     
  • Paul

    Paul - 2017-05-23

    Thanks for the update.

    cheers, Paul

     
  • JN

    JN - 2017-05-23

    I spoke too soon: once again, autotype has stopped working. However, I did notice that my request to be directed to somewhere to report the bug has been answered - by Poil, above. Yet, that link does not seem to point to a working webpage.

    Also: I tried the script that Poil kindly posted above (once I had realised it was a script, and once I'd adjusted it to my distribution and to my needs - and should its mentions of 'source.list' be 'sources.list'?). That script, so far as I understand it, ensures that a certain version of Mono, and only that version, is installed. But the script didn't work for me: it gave a load of errors about packages not being available.

     
  • JN

    JN - 2017-05-23

    Here is a working link to the bug report (the report mentioned above by Poil): https://bugzilla.xamarin.com/show_bug.cgi?id=43362

     
  • JN

    JN - 2017-06-04

    Given that, in the end, I couldn't get Poil's script, or my own versions of it, to work, is there anything I can do to get autotype working? Is there perhaps some better version of the script, or somewhere I can download Mono packages that don't break autotype, or some new version of Mono that fixed the problem? Thanks.

     
1 2 3 4 > >> (Page 1 of 4)

Log in to post a comment.