Unable to connect to sftp via dolphin opened graphically

In the Dolphin window on the left, which I open using the icon task management (taskbar), I am told that the authentication failed. But when I start dolphin using the command line (even without any parameters) I can get a gpg-agent verification window. Before this, I disabled password login on the connected host and set it to only use certificate login. And I removed the old information in kwallet. I’m wondering why I can’t open Dolphin directly (my native language is Chinese, I used translation software for the above information)

What is your distribution ?

When launching through the taskbar/plasma, dolphin starts properly with systemd wrapping logic that can restricts what it can do, like accessing kwallet or the network…

1 Like

➜ ~ kinfo
Operating System: Arch Linux
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.19.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 16 GiB of RAM (15.4 GiB usable)
Graphics Processor 1: Intel® HD Graphics 530
Graphics Processor 2: NVIDIA GeForce GTX 970M

What I mean is, before encountering this problem, I was logging in with a password and had saved my login credentials. The issue arose when I tried to set up certificate login (authentication failed), but I could open Dolphin using the command line, which then gave me the correct verification window.

Can I get a reply ?……

This issue originates from the SSH_AUTH_SOCK variable. Initially, I set it in the .zshrc

so it only worked for shell and not for anything else.

Later, I tried to add
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
to /etc/environment, but the final output I got was
declare -x SSH_AUTH_SOCK="\$(gpgconf --list-dirs agent-ssh-socket)"
in the export output.

The final solution was to add the following to /etc/profile:

unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
  export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi

I don’t speak English, but I think I’ve made my question clear.