4

before plasma 5 I had my kwallet unlocked at login and it worked well (same password for kwallet as for my session).

Now, with plasma 5, it does not work anymore, I think I'm not far from working this out, but I don't know what to do next.

Here is my setup, in ~/.config/plasma-workspace/env/ssh-agent.sh :

#!/bin/bash
export SSH_ASKPASS=/usr/bin/ksshaskpass
eval $(ssh-agent)
/usr/bin/ssh-add ~/.ssh/servers ~/.ssh/gitolite

Note that I load 2 keys whith ssh-add. After login in, I have to unlock my wallet 2 times before the desktop shows up.

Anybody see What is going wrong ?

Thanks a lot.

skizo
  • 731
  • Here is an idea : maybe it's because the ksshaskpass is launched too early in the connection process. I'l look at this. – skizo Jun 02 '15 at 07:02
  • I have the same problem. I only have to enter my password once for kwallet, though (so, twice in total: once for login, once for kwallet) (Kubuntu 15.10) (sddm seems to talk to pam_kwallet.so somehow, according to syslog) – Magnus Hoff Nov 10 '15 at 10:31
  • In Kubuntu 15.10, there are more services using the kwallet5 framework (maybe this sentence is a bit inacurate ...). But the problem persists. Anyway, I switched back to XFCE, because of the sum of little annoyances in KDE. I miss some features though. – skizo Nov 18 '15 at 13:28
  • any solution yet? I have the same problem and I realized it is because of sddm not plasma. for example: with gdm kwallet is unlocked before the profile get's loaded. – iRaS Jan 28 '19 at 06:48

1 Answers1

0

I have a workaround that I don't want to use anymore maybe it helps someone.

Add the following if statement around your ssh-add command:

#!/bin/bash
export SSH_ASKPASS=/usr/bin/ksshaskpass
eval $(ssh-agent)

if pstree -s -p $$ | grep Xsession; then
    exit
fi

/usr/bin/ssh-add ~/.ssh/servers ~/.ssh/gitolite

Explanation: When you start a terminal the parent process is not a Xsession and therefore the ssh-add command is executed. At this time the kwallet is already unlocked and it does not ask for the passphrases of the ssh keys.

iRaS
  • 296