Menu

#2146 KPUInput fails on Fedora 35 (Wayland)

KeePass_2.x
closed
None
5
2022-10-01
2022-03-11
No

Hello,

I followed the instructions for Auto-Type on Wayland (running Fedora 35) and installed KPUInput.
When I press Ctrl+V the Keepass (version 2.48.1) window is minimized and an error window pops up:

First line contains the username/password sequence like
username{TAB}mypassword{ENTER}

Second line reads:
KPUInputN.so assembly:<unknown assembly=""> type:<unknown type=""> member:(null)</unknown></unknown>

Thanks,
Stefan

Discussion

  • Stefan Katletz

    Stefan Katletz - 2022-03-11

    Sorry, should have formatted correctly. Second line reads:
    KPUInputN.so assembly:<unknown assembly> type:<unknown type> member:(null)

     
  • Stefan Katletz

    Stefan Katletz - 2022-03-11

    In the past I was using the workaround with xdotool, see
    https://thelinuxexperiment.com/set-up-keepass-auto-type-on-linux/

    This stopped working with Chromium in the last days, with some other programs this still works.
    With the KPUInput plugin installed I also get the error window when I use the system wide keyboard shortcut for invoking xdotool.
    hth,
    Stefan

     
  • Dominik Reichl

    Dominik Reichl - 2022-03-29
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2022-03-29

    I cannot reproduce this issue. I've tested KeePass 2.50 together with KPUInput 1.3 on an up-to-date Fedora 35 system; it works fine for me.

    The error message that you mentioned typically occurs when the KPUInputN.so file has not been built successfully or if it's not in the KeePass application directory (the one that contains KeePass.exe).

    Best regards,
    Dominik

     
  • Stefan Katletz

    Stefan Katletz - 2022-04-03

    Hello Dominik,

    thanks for the reply. I also upgraded to keepass 2.50 (DEV. 220122), I used the rpm for fc36 found in https://koji.fedoraproject.org/koji/buildinfo?buildID=1902870 (I am still on fc35).
    It was still not working (reinstalled KPUInput plugin and got the same error message when using the autotype from keepass). Nothing happened when using the global keyboard shortcut (envoking "mono /usr/lib/keepass/KeePass.exe --auto-type").

    Then I installed Google Chrome (100.0.4896.60) and there it's working - only I had to remove the KPUInput plugin again to avoid the error window popping up.

    So it seems that something is wrong with chromium (Freeworld, 99.0.4844.84, also removed all the user seetings to no avail), and for me the plugin isn't working either. There is no error when I compile KPUInputN.so . What are the permissions/owner of the files that should be copied to /usr/lib/keepass ? Keepass uses mono and seems to be a 32bit binary, while KPUinputN.so is 64bit, any problem with this?
    No big problem since the global shortcut works.

    Btw, in chromium I usually use "KeePass Tusk", only for some sites I need a custom sequence.

    Thanks for your work!
    Stefan

     
  • Dominik Reichl

    Dominik Reichl - 2022-04-03

    Global auto-type does not work on Wayland. This is documented on
    https://keepass.info/help/kb/autotype_wayland.html
    (section 'General', paragraph 'Advanced auto-type features...').

    I don't really see why auto-type worked for you after removing the KPUInput plugin. Maybe you installed xdotool and this worked over XWayland.

    The KPUInputN.so file must be readable by KeePass (both in the same folder), and it should have the same bitness as the operating system. The KeePass.exe file is compiled for the 'Any CPU' platform (i.e. on a 64-bit system, Mono runs it as 64-bit application, and on a 32-bit system, Mono runs it as a 32-bit application).

    Best regards,
    Dominik

     
  • Stefan Katletz

    Stefan Katletz - 2022-04-03

    thanks for clarification. exactly, for global autotype I'm using xdotool, which stopped working with chromium, but still works with chrome (sandbox problem?)

    KPUInput plugin also breaks global autotype, I set owner to root.root and permission to 555 for the KPUInput* files, all are in the keepass directory and it is shown in the plugins list. all I ever get is the error message. I also generated the group and udev rules.

    well, I don't have a problem to use chrome for some sites... and eventually Wayland becomes less of a pain in the future.
    cheers,
    Stefan

     
  • Julian Sikorski

    Julian Sikorski - 2022-09-30

    I am seeing the same error with Fedora 36, keepass 2.52 and just released KPUInput 1.4.

     
  • Dominik Reichl

    Dominik Reichl - 2022-09-30

    I've tested KeePass 2.52 with KPUInput 1.4 on Fedora 36; it works fine for me.

    When you run mono KeePass.exe --debug, do you see a more detailed error message?

    Thanks and best regards,
    Dominik

     
    • Julian Sikorski

      Julian Sikorski - 2022-09-30

      There is nothing related in the log unfortunately:

      $  /usr/bin/mono /usr/lib/keepass/KeePass.exe --debug
      Gtk-Message: 22:17:45.425: Failed to load module "pk-gtk-module"
      XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
      xdo_get_active_window reported an error
      XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
      xdo_get_active_window reported an error
      XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
      xdo_get_active_window reported an error
      XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
      xdo_get_active_window reported an error
      

      I was wondering whether the two patches used by the keepass rpm package could have anything to do with the error?
      https://src.fedoraproject.org/fork/belegdol/rpms/keepass/tree/rawhide

       
      • Julian Sikorski

        Julian Sikorski - 2022-09-30

        This has definitely something to do with the rpm. I have just tested with keepass portable and the plugin works as expected.

         
        • Julian Sikorski

          Julian Sikorski - 2022-10-01

          It is not the XSL patch, disabling it made no difference.
          RPM package is built with xbuild, can this be the reason?

           
  • Dominik Reichl

    Dominik Reichl - 2022-10-01

    Mono doesn't find the KPUInputN.so file in this case (not sure why).

    I've now added another step (7.) in the 'Setup' section of the KPUInput help page, after which Mono finds the file:
    https://keepass.info/help/kb/autotype_wayland.html#setup

    I've experimented with a KeePass.conf file in /etc/ld.so.conf.d/ and a line in /etc/ld.so.conf (and running ldconfig), but these approaches didn't work. Changing the LD_LIBRARY_PATH environment variable worked (if it's changed before running KeePass), but this of course has various disadvantages (security, more complicated to setup, ...). Copying the file to /usr/lib isn't ideal, but I currently don't see any better (distribution-independent) solution (if you have an idea, please let me know!).

    Thanks and best regards,
    Dominik

     
    • Julian Sikorski

      Julian Sikorski - 2022-10-01

      Thank you! I can confirm that putting KPUInputN.so in /usr/lib64 on an x86_64 system works as well. I guess this makes sense that if using an RPM installed to system-wide paths, an architecture-specific plugin would need to be put to a correct system-wide location as well.

       
      • Julian Sikorski

        Julian Sikorski - 2022-10-01

        I have now created a preliminary RPM package of the KPUInput plugin, with KPUInput.dll built from source. Is there a source file for KPUInput.plgx?

         
  • Dominik Reichl

    Dominik Reichl - 2022-10-01

    The KPUInput.plgx file can be built by packing all files contained in KPUInput-1.4-Source.zip. For details, see
    https://keepass.info/help/v2_dev/plg_index.html#plgx

    Thanks and best regards,
    Dominik

     

Log in to post a comment.

MongoDB Logo MongoDB