You are not logged in.

#1 2015-02-07 14:53:26

Syncopated
Member
Registered: 2015-02-07
Posts: 14

ssh-agent under Plasma 5

Hi,

I was previously running KDE 4 but just installed plasma-meta and stopped being able to enter my SSH passphrase just once per session. Previously, when the SSH passphrase is needed, a window pops up and I type it in and I don't have to type it again for a while. Now, under Plasma 5.2 which I just installed, I get the text prompt to enter my passphrase all the time in every terminal whenever I ssh. I'm trying to get a usable setup for Plasma so that I just need to enter the passphrase once per session (until it times out).

I have the following packages installed: kde-agent, gnupg.

According to this wiki: https://wiki.archlinux.org/index.php/SS … nuPG_Agent, I only need to put

enable-ssh-support

in ~/.gnupg/gpg-agent.conf, but that didn't work. Additionally, I notice that the script /etc/kde/env/gpg-agent-startup.sh, owned by kde-agent, is not getting executed when I login. I found out by inserting a line

date > /tmp/agent-debug

and noticing that /tmp/agent-debug didn't materialize.


I'm already following the wiki as best as I can, but I suspect they are outdated wrt the transition between 4 and 5. How do I fix this SSH agent problem?

Incidentally, I see that ~/.kde4 keeps getting created when I login to Plasma 5 after I delete ~/.kde4. Shouldn't it be ~/.kde5?

Last edited by Syncopated (2015-02-07 15:09:05)

Offline

#2 2015-02-07 15:23:51

Syncopated
Member
Registered: 2015-02-07
Posts: 14

Re: ssh-agent under Plasma 5

I wonder if all this is because of autostart brokenness:
https://bugs.kde.org/show_bug.cgi?id=338242

Offline

#3 2015-02-07 21:46:07

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: ssh-agent under Plasma 5

Plasma 5 runs scripts at startup from the /etc/plasma-workspace/env/ dir instead of /etc/kde/env/. I don't know if the kde-agent script is compatible with Plasma 5 though.
The .kde4 dir is automatically created by Plasma 5 in order to apply the changes made in systemsettings to KDE4 applications.

Offline

#4 2015-02-08 08:55:10

Syncopated
Member
Registered: 2015-02-07
Posts: 14

Re: ssh-agent under Plasma 5

arojas wrote:

Plasma 5 runs scripts at startup from the /etc/plasma-workspace/env/ dir instead of /etc/kde/env/. I don't know if the kde-agent script is compatible with Plasma 5 though.
The .kde4 dir is automatically created by Plasma 5 in order to apply the changes made in systemsettings to KDE4 applications.

I suppose the kde-agent package hasn't updated to the new directory:

$ sudo pacman -Ql kde-agent
kde-agent /etc/
kde-agent /etc/kde/
kde-agent /etc/kde/env/
kde-agent /etc/kde/env/gpg-agent-startup.sh
kde-agent /etc/kde/shutdown/
kde-agent /etc/kde/shutdown/gpg-agent-shutdown.sh

For simplicity, I'm using envoy for now, adapting the envoy instructions from the SSH keys wiki.

Last edited by Syncopated (2015-02-08 08:56:58)

Offline

#5 2015-02-10 01:32:26

EdCates
Member
Registered: 2012-04-22
Posts: 3

Re: ssh-agent under Plasma 5

Thanks to the information provided here, I was able to get this working in KDE 5. I put the following in ~/.config/plasma-workspace/env/ssh-agent-startup.sh:

#!/bin/sh
[ -n "$SSH_AGENT_PID" ] || eval "$(ssh-agent -s)"

and this in ~/.config/plasma-workspace/shutdown/ssh-agent-shutdown.sh:

#!/bin/sh
[ -z "$SSH_AGENT_PID" ] || eval "$(ssh-agent -k)"

It works a treat!

Note that for KDE4 these scripts were in ~/.kde4/env/ and ~/.kde4/shutdown/, respectively.

Offline

#6 2015-04-21 22:27:22

fjacob
Member
Registered: 2015-04-21
Posts: 1

Re: ssh-agent under Plasma 5

I just learned that the system-wide directory is now /etc/xdg/plasma-workspace, not /etc/plasma-workspace, by the way.

The search paths are determined in http://quickgit.kde.org/?p=plasma-works … tkde.cmake by:

qtpaths --paths ConfigLocation | tr ':' '\n' | sed 's,$,/plasma-workspace,g'

Offline

#7 2015-05-21 15:47:59

t0ken
Member
Registered: 2012-06-29
Posts: 29

Re: ssh-agent under Plasma 5

Hate to resurrect a dead thread, but hoping this will help someone.

I simply did:

ln -s /etc/kde/env/gpg-agent-startup.sh ~/.config/plasma-workspace/env/

and it all works fine now!

Offline

Board footer

Powered by FluxBB