You are not logged in.
Hi!
I recently switch to using fish as interactive shell with bash as login shell. I'm trying to get ssh-add to use ksshaskpass when I type it in Konsole, but ssh-add won't use ksshaskpass and thus won't use KWallet and just ask for the password in the console instead. However, if I run ssh-add with KRunner, it will use ksshaskpass and pull the password from KWallet, like it supposes to. Does anyone have any insight into this problem?
For the ssh-agent, I set it up using systemd user service, following the wiki. SSH_AUTH_SOCK is set through environment.d.
# ~/.config/environment.d/ssh_agent.conf
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
SSH_ASKPASS and SSH_ASKPASS_REQUIRE are set like this:
# ~/.config/environment.d/ssh_askpass.conf
SSH_ASKPASS=/usr/bin/ksshaskpass
SSH_ASKPASS_REQUIRE=prefer
My ~/.bashrc, also using the wiki.
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
## Aliases
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
## Fish
if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} && ${SHLVL} == 1 ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
exec fish $LOGIN_OPTION
fi
Last edited by TheBill2001 (2024-08-10 04:39:26)
Offline
My ~/.bashrc, also using the wiki.
Remove that nonsense.
If you want to run fish as shell in some GUI TE, configure the TE to execute fish by default (pretty sure konsole has a setting for that - per profile)
Then check "printenv" for the actual environment, nb. that fish does't support the common "export foo=bar" syntax at all.
You might want to look into https://wiki.archlinux.org/title/Fish#S … e_on_login for that.
Online
Thank you for replying. Setting fish to run through Konsole's profile solved the issue. I initially chose the .bashrc route so that I could have fish in TTY environment as well. But since I also use a fish theme that doesn't behave well in TTY, there is no point of using fish with it. So just using fish in Konsole is good enough.
Offline