3
submitted 10 months ago* (last edited 10 months ago) by Object@sh.itjust.works to c/bashing@sh.itjust.works

Requirements: GoCryptFS, a secret service, secret-tool for command line key access, notify-desktop for notification

Store a secret in your secret storage

# Label is the entry title in your secret storage, it doesn't matter what you choose
# The "Use" is the attribute name, and "GocryptFS_Secret_Encryption_Key" is the attribute value
# We will use the attribute key and value to find the password
secret-tool store --label "My GoCryptFS Password" Use GocryptFS_Secret_Encryption_Key
# You will now be prompted to enter a password.
# Enter the password you used to create GoCryptFS storage

Unlock script

encDir=~/Sync/Passwords/Secrets/ # Location of the encrypted files
mountDir=~/Mounts/Secrets/ # Where you want the decrypted files to appear
mkdir -p $mountDir; # That directory need to exist
notify-desktop GocryptFS "$(gocryptfs -extpass 'secret-tool lookup Use GocryptFS_Secret_Encryption_Key' $encDir $mountDir)"; # Find the key from the secret storage, unlock it, and show notification
no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 24 Jan 2026
3 points (100.0% liked)

BASHing

51 readers
1 users here now

Share your bash scripts here!

founded 10 months ago
MODERATORS