Announcement

Collapse
No announcement yet.

CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

    Since my upgrade from 11.04 to 11.10 Kgpg will not decrypt files. Seemingly part of this is that gpg-agent won't run. If I create a file 'tester1.doc' I can encrypt it with my public key and decrypt it with my private key like so:

    $ gpg --encrypt --armor tester1.doc

    $ gpg --output tester1.clear.doc --decrypt tester1.doc.asc

    I get the new file, tester1.clear.doc, which is the decrypted version of the orginal.

    With Kgpg I get an error message that gpg-agent won't run. Then I'm prompted for my passphrase and I get an error that the file cannot be decrypted. Given the CLI results and the fact that I can decrypt the same encrypted file in Windows PGP with the same public/private key pair that I'm using in Kubuntu, the problem sure looks like Kgpg. I have very little experience with solving a problem of this type. Searching these forums has shown that no one has gotten an answer to solving a Kgpg problem like this. Searching the internet also yielded very little. I got help with the CLI stuff from Linusquestions.org. Does anyone have a solution? Is there a special forum I should post this problem on? Is this a bug I should report? Everything worked OK in 11.04.


    #2
    Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

    Given that your researched has turned up no solutions, it does sound like a bug report is in order.

    http://bugs.kde.org

    Comment


      #3
      Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

      Thanks for the reply. I submitted a bug report with KDE. I don't know if you'll check this thread again but why do you think the problem is with KDE/Kgpg rather than Kubuntu?

      Comment


        #4
        Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

        On my Oneiric box, which I haven't yet upgraded to KDE 4.8 beta, Kgpg works fine. I have no ~/.gnupg/options file. The gpg-agent, while installed, is not running.

        On my Precise box, which is running KDE 4.8 beta, the gpg-agent is running. I have no options file. When I try to start Kgpg, I receive an error indicating that the options file is missing. I created an empty options file and then saw the same error you reported in the other thread. I stopped gpg-agent and the problem persists.

        Now as to why I think this is a KDE bug rather than a Kubuntu bug... while my Oneiric system is running Kubuntu, my Precise system is a hand-crafted with Ubuntu and KDE -- no Kubuntu-specific packages are installed. So this bug appears to be a KDE problem.

        BTW, what's your bug number? I'd like to add my findings to the report.

        Comment


          #5
          Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

          The Bug # is 290113

          Comment


            #6
            Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

            I was curious, how long does it usually take to get a reply on filing a bug? Also, I checked the report today (18 Jan) and it didn't look like you had added your findings to the report. I only mention it becasue I think it would add more weight to the report since your results narrow it to a KDE problem you obviously know a lot more about Linux than I do.

            Comment


              #7
              Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

              Oh crap, I completely forgot about this. I'll check later to see if the problem still persists and then file as appropriate. Thanks for the reminder!

              Comment


                #8
                Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                Yep, the problem persists. I've added my details to the bug report.

                Comment


                  #9
                  Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                  OK, after a bit more searching, I found bug 290221, which is strikingly similar to the problems you and I are having. It appears that Kgpg is now enforcing a configuration it previously ignored. The report claims that Kubuntu's default configuration is broken, which I don't understand because I'm not even running kubuntu-default-settings on this machine... I'll post a comment there and ask why.

                  Comment


                    #10
                    SOLVED: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                    bcooksley at the KDE forum helped me reach a resolution. It involved two separate bugs.

                    A recent commit introduced a regression that causes Kgpg to fail if ~/.kde/share/config/kgpgrc does not exist. You can manually create the file with this command:

                    kwriteconfig --file kgpgrc --group "GPG Settings" --key "gpg_config_path"
                    --type string "$HOME/.gnupg/gpg.conf"

                    After doing that, Kgpg will successfully start. This has been reported in KDE bug 291923.

                    However...when I ran that command, I received an error message about a missing language library. KWriteConfig, part of the package kde-runtime, needs icui18n but is currently not packaged with a dependency on its library. So even though bcooksley's command worked for me, I saw that missing library error. After installing libicu48, KWriteConfig runs without displaying errors.

                    Actually, it runs fine even though the file is missing, otherwise KDE would be totally inoperable, since KWriteConfig is responsible for creating rc files. It simply dies upon exit if the file is missing, and since I've never had to run it manually, I never noticed until now.

                    Although only a few packages actually include it as a dependency, libicu48 appears to be a fundamental component of many *buntus, given that it's listed in many APT desktop tasks:

                    Code:
                    steve@steve-aspire:~$ apt-cache show libicu48
                    Package: libicu48
                    - - -
                    Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-mobile-desktop, kubuntu-mobile-live, edubuntu-desktop, edubuntu-usb, edubuntu-desktop-kde, xubuntu-desktop, mythbuntu-frontend, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-slave, mythbuntu-backend-master, mythbuntu-backend-master, lubuntu-desktop, ubuntustudio-desktop
                    Because my Acer is manually built up from base rather than from one of those tasks, I didn't have the library. I'm going to file a bug against kde-runtime to suggest including a dependency on this library. Really, though, it probably should be a dependency of ubuntu-standard.

                    Comment


                      #11
                      Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                      I believe I followed your proposal but I still have the problem. From the CLI I ran"

                      kwriteconfig --file kgpgrc --group "GPG Settings" --key "gpg_config_path"
                      --type string "$HOME/.gnupg/gpg.conf"

                      That seemed to go OK, I got no errors noted. But it made no difference for the decryption problem. Kgpg has always run but from the error message I get gpg agent won't run and so I just assume that's why the decryption won't work. In fact Kgpg won't save the settings that my key is the default key if I set it, close Kgpg and restart it.

                      Just as I side note I can't find the libraries listed in your post, icui18n or libicu48, when I search for it with the package manager for 11.10.

                      Comment


                        #12
                        Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                        It appears that you might be experiencing a different bug than I was.

                        You might want to post your problem over in the KDE forum. One of the admins there (the person who helped with the bug I found) appears to know the maintainer of Kgpg.

                        Edited to add:

                        You aren't having the problem with the missing language pack file; if you were, then KWriteConfig would have thrown an error. I'm surprised that you seem not to have the file, though. What's the output of:

                        dpkg --list | grep libicu
                        apt-cache search libicu

                        Comment


                          #13
                          Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                          http://kubuntuforums.net/forums/inde...5602#msg285602
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Re: CLI Gnupg works, Kgpg does not decrypt, gpg-agent does not work

                            Originally posted by lcharles
                            That seemed to go OK, I got no errors noted. But it made no difference for the decryption problem. Kgpg has always run but from the error message I get gpg agent won't run and so I just assume that's why the decryption won't work.
                            That's likely a different issue from the one steve was describing (since kgpg starts fine for you).

                            Kgpg works fine here (I'm on precise, though), but here are few things to check:
                            1. Is kgpg set to use gnupg-agent?
                            2. Is gpg-agent (daemon) running?
                            3. which version of gnupg are you using (gnupg or gnupg2)?

                            Originally posted by lcharles
                            Just as I side note I can't find the libraries listed in your post, icui18n or libicu48, when I search for it with the package manager for 11.10.
                            Oneiric has libicu44

                            Comment


                              #15
                              OK a few issues.

                              Kgpg GUI shows that it is set to use gnupg-agent. I don't know how to check if the agent is running.
                              The command, gpg --version, gives me 'gpg (GnuPG) 1.4.11'

                              As an unintended result of the help Steve Riley gave me my bug report at KDE was cancelled saying it was like some other bug (which it isn't). How do I get the bug re-instated?

                              Lastly I apologize for taking so long to get back to respond but when Kubuntu forums switched over all of my mail from here got put in "SPAM" by aol. It took me a while to figure out what was going on and re-register.

                              Comment

                              Working...
                              X