I have a si,mple script which should be run when starting a plasma session. It used to work but not now. #!/bin/bash killall ssh-agent eval `/usr/bin/ssh-agent -s` When this script is run manually it exports two variables $ env |grep SSH SSH_AGENT_PID=8661 SSH_AUTH_SOCK=/tmp/ssh-AmjFwSlh7nT3/agent.8660 When run by plasma, the variables are lost, which means that ssh-add fails $ ssh-add Could not open a connection to your authentication agent Reproducible: Always
What version of plasma?
Plasma/5.5
ok. Verify the script is being run at all touch /tmp/something also startkde is just a shell script, so maybe you can add some hooks in there and investigate?
from konsole in kde5: $ env|grep SSH nothing shown $ ps -A |grep ssh 3147 ? 00:00:00 sshd 24688 ? 00:00:00 ssh-agent so the script has been started If I then do $ source ~/bin/sshagent.sh Agent pid 5215 $ env|grep SSH SSH_AGENT_PID=5215 SSH_AUTH_SOCK=/tmp/ssh-E2xOT4JQz8e8/agent.5214
Please can you add an echo $SSH_AGENT_PID > /tmp/somefile into /usr/bin/startkde just after line 211 where it sources the files.
I moved the scripts from ~/.config/autostart to .config/plaswm-workspace/env It now works correctly
Ah, yes. anything in "pre-startup" are run in a blocking way that sources any env changes anything in "startup" are forked into the background by ksmserver (and therefore env changes dont' sync) It's been like that since 4.x. AFAIK. but I guess it's not super clear in the docs.