File tree Expand file tree Collapse file tree 4 files changed +29
-8
lines changed Expand file tree Collapse file tree 4 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 3232
3333# Pre-startup scripts don't seem to work on Plasma Wayland,
3434# and therefore the pre-startup script has to be loaded here.
35- . " ${HOME} /Git/linux-scripts/startup/agx-user-pre-startup.sh"
35+ # . "${HOME}/Git/linux-scripts/startup/agx-user-pre-startup.sh"
36+ if [ -f " ${HOME} /.ssh-agent-info" ]; then
37+ eval " $( < " ${HOME} /.ssh-agent-info" ) " > /dev/null
38+ fi
Original file line number Diff line number Diff line change 1313export SSH_ASKPASS=" /usr/bin/ksshaskpass"
1414export SSH_ASKPASS_REQUIRE=prefer
1515
16- if ! pgrep -u " ${USER} " ssh-agent > /dev/null; then
16+ # Wait for kwallet
17+ # This is necessary on Wayland, but not on X11
18+ # if command -v kwallet-query &> /dev/null; then
19+ # kwallet-query -l kdewallet > /dev/null
20+ # fi
21+
22+ SSH_AGENT_UPDATED=false
23+ # Pgrep finds regexes, and without the specification for the start and end of the line,
24+ # it could find e.g. the gcr-ssh-agent provided by the package gcr,
25+ # and not start the correct SSH agent.
26+ if ! pgrep -u " ${USER} " ' ^ssh-agent$' > /dev/null; then
1727 # echo "SSH agent seems not to be started. Starting, and saving its configuration."
18- ssh-agent > ~ /.ssh-agent-info
28+ ssh-agent > " ${HOME} /.ssh-agent-info"
29+ SSH_AGENT_UPDATED=true
1930fi
20- if [[ " ${SSH_AGENT_PID} " == " " ]]; then
31+ if [[ " ${SSH_AGENT_PID} " == " " ]] || [ " ${SSH_AGENT_UPDATED} " = true ] ; then
2132 # echo "SSH agent configuration seems not to be loaded. Loading."
22- eval " $( < ~ /.ssh-agent-info) " > /dev/null
33+ eval " $( < " ${HOME} /.ssh-agent-info" ) " > /dev/null
2334fi
2435
2536# echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> "${LOG_PATH}"
Original file line number Diff line number Diff line change 66SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
77REPO_DIR=" $( dirname " ${SCRIPT_DIR} " ) "
88
9+ if command -v kwallet-query & > /dev/null; then
10+ kwallet-query -l kdewallet > /dev/null
11+ fi
12+
913# Run the pre-startup script again to ensure that the SSH agent is available
10- # . "${SCRIPT_DIR}/agx-user-pre-startup.sh"
14+ . " ${SCRIPT_DIR} /agx-user-pre-startup.sh"
1115
1216echo " Starting SSH agent configuration script."
1317SETUP_AGENT=" ${REPO_DIR} /ssh/setup_agent.sh"
Original file line number Diff line number Diff line change 11ZDOTDIR=" ${HOME} /Git/linux-scripts/zsh"
22
33if [ -f " ${HOME} /.cargo/env" ]; then
4- . " ${HOME} /.cargo/env"
4+ . " ${HOME} /.cargo/env"
55fi
66
77# Pre-startup scripts don't seem to work on Plasma Wayland,
88# and therefore the pre-startup script has to be loaded here.
9- . " ${HOME} /Git/linux-scripts/startup/agx-user-pre-startup.sh"
9+ # . "${HOME}/Git/linux-scripts/startup/agx-user-pre-startup.sh"
10+ if [ -f " ${HOME} /.ssh-agent-info" ]; then
11+ eval " $( < " ${HOME} /.ssh-agent-info" ) " > /dev/null
12+ fi
You can’t perform that action at this time.
0 commit comments