| Summary: | Running from the keyboard shortcut erases SSH_AUTH_SOCK from env | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kglobalaccel | Reporter: | Grief <iamgrief> |
| Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | danielroschka, iamgrief, kde.mandarin882, lucavall90, nicolas.fella, sam, vetruvet |
| Priority: | NOR | Keywords: | qt6 |
| Version First Reported In: | 6.0.0 | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Grief
2024-03-14 12:41:27 UTC
I can reproduce it too. Just Konsole with the default Ctrl+Alt+T shortcut to see the ssh-add -l command fail, but this does not happen if Konsole is run from krunner. How are you starting ssh-agent? (In reply to Nicolas Fella from comment #2) > How are you starting ssh-agent? In my case, it is automatically started by KeePassXC. The agent works as expected in every situation but when launching Konsole with the shortcut. I usually use Yakuake (automatically started after login) and works as expected there too. I use keepassxc too. That might be the reason Are you using X11 or Wayland? (In reply to Nicolas Fella from comment #5) > Are you using X11 or Wayland? Wayland. When you do "cat /proc/$(pidof kwin_wayland)/environ", does have SSH_AUTH_SOCK have the right value there? Sadly, I cannot answer your question anymore. I've updated the base layer of kde neon from jammy to noble (with just a few irrelevant packages left on hold) and I cannot reproduce the issue anymore after update. ```sudo cat /proc/$(pidof kwin_wayland)/environ|sed 's/\x0/\n/g'|grep -a SSH GSM_SKIP_SSH_AGENT_WORKAROUND=true SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh``` (In reply to Nicolas Fella from comment #7) > When you do "cat /proc/$(pidof kwin_wayland)/environ", does have > SSH_AUTH_SOCK have the right value there? This is the output: HOME=/home/lucaLANG=it_IT.UTF-8LC_ADDRESS=it_IT.UTF-8LC_IDENTIFICATION=it_IT.UTF-8LC_MEASUREMENT=it_IT.UTF-8LC_MONETARY=it_IT.UTF-8LC_NAME=it_IT.UTF-8LC_NUMERIC=it_IT.UTF-8LC_PAPER=it_IT.UTF-8LC_TELEPHONE=it_IT.UTF-8LC_TIME=it_IT.UTF-8LOGNAME=lucaPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binSHELL=/bin/bashSYSTEMD_EXEC_PID=1311USER=lucaXDG_DATA_DIRS=/home/luca/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktopXDG_RUNTIME_DIR=/run/user/1000DEBUGINFOD_URLS=https://debuginfod.neon.kde.org/:QT_ACCESSIBILITY=1DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busDESKTOP_SESSION=plasmaKCRASH_DUMP_ONLY=1KDE_APPLICATIONS_AS_SCOPE=1KDE_FORK_SLAVES=1KDE_FULL_SESSION=trueKDE_SESSION_UID=1000KDE_SESSION_VERSION=6MOZ_USE_XINPUT2=1PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socketPWD=/home/lucaQT_AUTO_SCREEN_SCALE_FACTOR=0QT_EXCLUDE_GENERIC_BEARER=1QT_WAYLAND_RECONNECT=1XDG_CONFIG_DIRS=/home/luca/.config/kdedefaults:/etc/xdgXDG_CURRENT_DESKTOP=KDEXDG_MENU_PREFIX=plasma-XDG_SEAT=seat0XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0XDG_SESSION_CLASS=userXDG_SESSION_DESKTOP=KDEXDG_SESSION_ID=3XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1XDG_SESSION_TYPE=waylandXDG_VTNR=1XKB_DEFAULT_LAYOUT=itXKB_DEFAULT_MODEL=pc105NOTIFY_SOCKET=/run/user/1000/systemd/notifyMANAGERPID=1252WATCHDOG_PID=1311WATCHDOG_USEC=15000000INVOCATION_ID=c660a3af3b934a7695d24ed237c7b133JOURNAL_STREAM=8:22227 The output above is the same when run on a Konsole instance launched with krunner, where however the SSH_AUTH_SOCKET is correctly set, in fact "env | grep SSH_AUTH_SOCKET" results in: SSH_AGENT_LAUNCHER=gnome-keyring SSH_AUTH_SOCK=/run/user/1000/keyring/ssh What seem to be happening is this: When launching apps via global shortcuts they are launched from kwin_wayland whereas when they are launched from the app launcher/krunner the launching process is plasmashell/krunner. When SSH_AUTH_SOCK is populated after kwin_wayland is started it will not be in kwin's environment, so it doesn't propagate to apps launched by kwin. Fedora ships a file /etc/xdg/plasma-workspace/env/ssh-agent.sh that causes SSH_AUTH_SOCK to be set before kwin starts, so for me on Fedora it works fine. However on Neon there's no such file so SSH_AUTH_SOCK is not set that way and only later set by something else Hello there! I just found this bug report while searching for an explanation to this weird behaviour, thanks so much Nicolas! For anyone else who finds this from a search engine: I have opened a Debian (which is the upstream of the upstream of Neon) bug here --> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084225 As a workaround you can add this line to your ~/.bashrc: export SSH_AUTH_SOCK=/run/user/${EUID}/openssh_agent |