copy to clipboard/mono

Help
genady
2009-12-13
2016-02-28
  • genady

    genady - 2009-12-13

    Just installed 2.09 on dual boot laptop to share my database between W7 and Kubutu. Keepass start fine and reads database from both sides no problem, however no meter what I do copy does not actually copes password value into system clipboard under linux. Might be something to do with mono setup, not sure. I hope there is a solution for this, otherwise I will have to rall back to older Linux native version but that would mean that I would need to keep 2 separate databases that is a pain.

    Any ideas would be greatly appreciated.  

     
  • John Beranek

    John Beranek - 2009-12-14

    I have no suggestion/solution, but I confirm I have the issue too. It is stopped me upgrading to KeePass 2 running under Mono (from KeePass 1 running under Wine).

    OS: Fedora 12
    Mono 2.4.2.3
    KeePass 2.0.9

    No clipboard functionality works within KeePass, but I have tested clipboard functionality in another .NET/Mono app (Tomboy) and it works as expected.

    John.

     
  • John Beranek

    John Beranek - 2009-12-14

    Hmm, just found this response in another forum thread from 'pail459':

    > Mono does not provide this capability. Ask for it to be added on the Mono forum.
    >
    > cheers, Paul

    I'm sure this can't be true!?

    John.

     
  • Paul

    Paul - 2009-12-14

    Have you tried turning off the clipboard auto clear?

    cheers, Paul

     
  • John Beranek

    John Beranek - 2009-12-14

    From reading the KeePass source code, I can say that one reason clipboard support doesn't work anywhere but Windows is because it uses native Windows calls rather than .NET/WinForms calls…

    John.

     
  • Dominik Reichl

    Dominik Reichl - 2009-12-14

    If you'd actually have a look at the KeePass 2.x source code (specifically the file KeePass/Util/ClipboardUtil.cs) you'd see that KeePass uses .NET methods to copy data to the clipboard, not native ones.

    There is an optimization for clearing the clipboard on Windows, but on other operating systems, KeePass falls back to the .NET call; and this doesn't affect copying at all anyway.

    Best regards,
    Dominik

     
  • John Beranek

    John Beranek - 2009-12-14

    OK, I may not have read the source code very thoroughly/accurately. The only thing that rings alarm bells to me is the CreateProtectedDataObject() call to create the clipboard data - perhaps this is what isn't supported in Mono.

    Unfortunately I can find very little information on clipboard support in Mono - I had a very brief effort at getting an answer to the question on the Mono team's IRC channel…with no response.

    John.

     
  • genady

    genady - 2009-12-14

    Was this actually tested on systems other then windows? Can it be KDE 4.x specific?

     
  • genady

    genady - 2009-12-14

    Yes I did disable auto clear. Has no effect on outcome.

     
  • Dominik Reichl

    Dominik Reichl - 2009-12-15

    The CreateProtectedDataObject method is defined in just the same file…

    I've tested the clipboard functionality on:

    - Ubuntu 9.10 / Mono 2.4.2.3 / Gnome. => Works fine.
    - OpenSUSE 11.2 / Mono 2.4.2.3 / KDE 4. => Doesn't work.

    <br />
    So, yes, this problem in Mono is specific to KDE 4.

    Best regards,
    Dominik

     
  • John Beranek

    John Beranek - 2009-12-15

    I'm using Fedora 12 / Mono 2.4.2.3 / Gnome 2.28 and the clipboard functionality **doesn't** work.

     
  • Dominik Reichl

    Dominik Reichl - 2009-12-15

    I've just tested Fedora 12 / Mono 2.4.2.3 / Gnome, and it actually **does** work, just like it works on Ubuntu/Gnome: the data is copied to the clipboard and pasting using Ctrl-V and Shift-Insert works fine, however there's no visual feedback ('Paste' command in context menus are grayed out); Mono is responsible for this.

    Best regards,
    Dominik

     
  • John Beranek

    John Beranek - 2009-12-15

    Gosh, it does seem to work like that for me too. A further difficulty for me is that it seems that gnome-terminal won't do a paste from a keyboard shortcut if it doesn't believe there is anything in the clipboard. Oh dear, oh dear, oh dear.

    It's a shame it doesn't also set the primary X11 selection, but that's certainly another one for the Mono developers.

    John.

     
  • Luckyrat

    Luckyrat - 2009-12-15

    Maybe try Mono 2.6? The release notes mention fixes relating to the Linux clipboard:

    "Linux Clipboard - support added for custom data formats and IDataObject"

    Although I'm not sure if that particular change will help, it might indicate they've given this area some attention since 2.4.2.3.

    Thanks,
    Chris

     
  • Anonymous - 2009-12-22

    I have an installation of KeePass 2.09 on Gentoo running KDE 4.3 and Mono 2.4.2.3.  The copy and paste works just fine, as does clipboard clearing.

    However, on my Mac I cannot get the clipboard to work at all with either Mono 2.4 or 2.6.  This is extremely annoying.  Any idea why or how to fix this?

     
  • one71

    one71 - 2010-01-08

    I have the same problem (with others). Have you test if the mono 2.6 helps?

     
  • one71

    one71 - 2010-01-09

    I have another thread open on more or less this topic:

    http://sourceforge.net/projects/keepass/forums/forum/329221/topic/3511297

    Tried:

    * OS -> ubuntu 9.10 (i.e. gnome)
    * mono 2.4.2.3 (was preinstalled and it is used by the ubuntu GUI itself i.e. I can not change it)
    * libmono-winforms2.0-cil 2.4.2.3 (I hd to install)
    * keepass 2.09 portable (downloaded manually, unpacked manually, started as mono keepass.exe)

    Problems:

    1) As soon as you minimize it/lock it/put to tray and then maximize it again you loose "the whole toolbar" i.e. you still have the GUI "where the DB lives" but the "frame GUI" is without buttons
    2) no matter how you "copy to clipbooard" and no matter how you try to paste what is meant to be on the clipboard nothing happens: I do not know where it is coping ……
    3) The auto-type functionality does not work at all.

    My  aim would be to use it under opensuse 11.0 (KDE 3.5.9)  but I haven't test it jet.

     
  • one71

    one71 - 2010-01-11

    I have installed a test host with my "aim OS" (opensuse 11.0, KDE 3.5.9 ) and tested ….

    Out of the box
    rpm -qa mono*
    mono-data-1.9.1-6.5
    mono-winforms-1.9.1-6.5
    mono-data-sqlite-1.9.1-6.5
    mono-web-1.9.1-6.5
    mono-core-1.9.1-6.5

    Following
    http://software.opensuse.org/search?baseproject=openSUSE%3A11.1&p=1&q=keepass#

    I have added the
    http://download.opensuse.org/repositories/Mono:/Community/openSUSE_11.1+Mono/
    repository and installed keepass

    It install, sets all "icons" and starts but as soon as you try to open a DB gives an error (I knew it it needs at least mono 2.2 but I have tried anyway)

    Following
    http://www.go-mono.com/mono-downloads/download.html
    (openSuse -> opensuse11.0 -> i586,x86_64)
    I have added the
    http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.0
    repository

    to force the vendor change and the "upgrade" to the mono 2.6.x which is skipped with the mono-stable I have installed mono-winfxcore, to resolve conflicts I have accepted the vendor change

    I end up with:

    rpm -qa mono*
    mono-basic-2.6-33.9
    mono-extras-2.6.1-31.1
    mono-wcf-2.6.1-31.1
    mono-core-2.6.1-31.1
    mono-web-2.6.1-31.1
    mono-winforms-2.6.1-31.1
    mono-data-sqlite-2.6.1-31.1
    mono-data-2.6.1-31.1
    mono-winfxcore-2.6.1-31.1

    cp KeePass.config.xml /usr/lib/keepass/
    cd /usr/lib/keepass/
    chmod a+rx KeePass.config.xml

    Now it starts, it opens the "win created" DB's.

    There are thinks which work and things which don't.

    "copy to clipbooard"  -> works without problem

    Still do not work:
    1) As soon as you minimize it/lock it/put to tray and then maximize it again you loose "the whole toolbar" i.e. you still have the GUI "where the DB lives" but the "frame GUI" is without buttons
    2) The auto-type functionality does not work at all.

     
  • Paul Nickerson

    Paul Nickerson - 2014-06-01

    This is an old thread, but it came up in my first in my search, and I found a solution, so I'm posting it here. Install the xsel and xdotool packages. This worked for me with KeePass 2.26 running in Mono 2.10.8 on Fedora 20. Found the solution on the KeePass website.

     
    • Stephan Sokolow

      Stephan Sokolow - 2014-10-02

      Unfortunately, that doesn't solve it for people like me who are forced to re-type things because they're neither usernames nor passwords.

      (eg. auto-type strings for UserVoice-style "white-box service with a weird login dialog" service providers)

       
      Last edit: Stephan Sokolow 2014-10-02
    • Nicholas Goodman

      You are a philosopher king. Thank you.

       
  • Paul

    Paul - 2014-10-02

    Are you saying copy/paste doesn't work with the xsel/xdotools packages?
    What OS / Mono etc?

    cheers, Paul

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks