Hide console output on launch
craftbyte opened this issue · 5 comments
craftbyte commented
When launching as per the README every first time starting up the WSL machine the following is displayed:
[2] 39
[2] + 39 done setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork > /dev/null 2>&1
[2] 44
[2] + 44 done setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork > /dev/null 2>&1
Would it be possible to supress this output, I have tried with no luck.
tobiaskohlbau commented
Which shell are you using? Normally this should be suppressed already.
craftbyte commented
zsh with oh-my-zsh, found solution right after posting (parantheses):
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
rm -f $SSH_AUTH_SOCK
(setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe" >/dev/null 2>&1 &)
fi
export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
ss -a | grep -q $GPG_AGENT_SOCK
if [ $? -ne 0 ]; then
rm -rf $GPG_AGENT_SOCK
(setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
fi
tobiaskohlbau commented
Perfect otherwise this would be @BlackReloaded to answer as I’m not using zsh. Glad you found a solution! Now I’m curious if that’s something we should put into the README. @BlackReloaded do you have output on startup?
craftbyte commented
@tobiaskohlbau does it still work as intended on bash for you?
tobiaskohlbau commented
Yes I use exactly that shown settings on all of my machines.