I received my openPGP-Card for my Librem5 today and tried to get this working.
Unfortunately it seems that the script does not find the card.
Script:
purism@pureos-librem5:~/git/smartcard-luks-osk$ LANG=EN ./smartcard-luks-osk pubkey.asc l5
scdaemon installed
gpg: keybox '/dev/shm/tmp.4i8Gv6dIZ1/pubring.kbx' created
gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device
Insert your OpenPGP smart card and press Enter
gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device
When looking for the card:
purism@pureos-librem5:~/git/smartcard-luks-osk$ LANG=EN gpg --card-status
gpg: WARNING: unsafe permissions on homedir '/home/purism/.gnupg'
Reader ...........: L5 built-in SmartCard Reader XXX
Application ID ...: XXX
Application type .: OpenPGP
I thought it could be related to this issue, but sudoing for the card worked for me (not at the first time but later - only when I does not work without sudo anymore until I reboot)
Steps to reproduce what I did:
turned off phone
Added the openPGP-Card
turned on phone (automatic with battery insertion)
enter LUKS pw
enter regular PW and PW for passwords
logged into librem5 via ssh
gpg --card-edit
gpg/card> admin
gpg/card> passwd
(Changed admin password and pin)
gpg/card> generate
(Generated a key exporting it and set expiration, name mail)
gpg/card> quit
gpg -k My-Mail (to see that it was successfully exported)
gpg --card-status (to see that the key is also on the smart card)
./smartcard-luks-osk pubkey.asc l5 (trying the script with output above)