Bug 434441 - Autostart script to unlock ssh keys doesn't seem to be launched when using systemd startup
Summary: Autostart script to unlock ssh keys doesn't seem to be launched when using sy...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-15 13:52 UTC by Kevin C
Modified: 2021-04-28 17:06 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin C 2021-03-15 13:52:50 UTC
I Create a small script to unlock my SSH Keys in ~/.config/autostart-scripts/ssh-add.sh. I have no prompt to entre my SSH passphrase. 


STEPS TO REPRODUCE
1. create script as explained at https://wiki.archlinux.org/index.php/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases.
2. Logout and login

OBSERVED RESULT
No prompt for SSH passphrase

EXPECTED RESULT
SSH Prompt to enter passphrase and unlock SSH Key


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Environment variables are exported :
SSH_AUTH_SOCK=/run/user/1026/ssh-agent.socket
SSH_ASKPASS=/usr/bin/ksshaskpass
Comment 1 David Edmundson 2021-03-15 14:06:03 UTC
x or wayland?
Comment 2 Kevin C 2021-03-15 14:49:30 UTC
X11
Comment 3 Nate Graham 2021-03-15 21:13:26 UTC
Are you using systemd startup?
Comment 4 Kevin C 2021-03-15 21:54:36 UTC
I'm using Systemd startup.
Comment 5 Kevin C 2021-03-17 10:17:02 UTC
I tested same configuration in a fresh Debian 10 instance with
KDE Plasma : 5.14.5
KDE Framework : 5.54.0
Qt : 5.11.3

and it works.
Comment 6 Kevin C 2021-03-17 19:48:09 UTC
works too in Debian testing with
KDE Plasma : 5.20.5
KDE Framework : 5.78.0
Qt : 5.15.2
Comment 7 Nate Graham 2021-03-17 19:49:48 UTC
Can confirm that running `ssh-add` via autostart does not work with systemd startup, and does work without it. You're using released packages, so this isn't Bug 427340.
Comment 8 Alex Smith 2021-04-12 10:19:49 UTC
I also see this after an (early) upgrade to Fedora 34. The ~/.config/autostart-scripts/ssh-add.sh script I had which was previously working on Fedora 33 no longer executes at startup, despite showing in the list in Autostart in System Settings.

However, adding a .desktop file in ~/.config/autostart to run a script doing the same thing does work:

[Desktop Entry]
Type=Application
Name=ssh-startup
Exec=/home/alex/bin/ssh-startup.sh
StartupNotify=false
Terminal=false

This is using systemd startup (appears to be default in Fedora 34) on Wayland, with:

Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Comment 9 Nate Graham 2021-04-28 17:06:47 UTC
Fixed by Henri Chain with https://invent.kde.org/plasma/plasma-workspace/-/commit/93f9ef0304f300dc3952ac9a25cbd82996eec263 in Plasma 5.22!