Linux Desktop Debian Ubuntu: apt-key workaround.

Ok, I have attempted to create a workaround for the deprecated apt-key command in the Ubuntu/Debian installation instructions. I’ll offer my attempt a community contribution (I am not a programmer) and share the results.

Instructions:


# Installation steps for writeas desktop on Kubuntu v25.10.
# v1.0 6 Jan 25 BenHM3 (Who neither takes nor offers responsibility for the results of using this info.)
# Sources: 
# (A) https://mangohost.net/blog/how-to-handle-apt-key-and-add-repository-deprecation-using-gpg-on-ubuntu-24/
# (B) Cross-checked (A) with https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key
# (C) https://gist.github.com/oseme-techguy/bae2e309c084d93b75a9b25f49718f85
# (D) Obtained (C) from https://askubuntu.com/questions/1321944/tried-to-fix-gpg-warning-unsafe-warning-on-homedir-but-it-went-very-wrong
#
#Steps:
# 1. Create directory ONLY if it doesn't exist. Check it first.
# sudo mkdir -p /etc/apt/keyrings
#
# 2. Download the key into the folder referred to in Step 1.
gpg --keyserver keyserver.ubuntu.com --recv-keys DBE07445
# If Step 2 generates a warning like "gpg: WARNING: unsafe permissions on homedir '~/.gnupg'" 
# then use the following 3 steps (C):
# chown -R $(whoami) ~/.gnupg/
# chmod 600 ~/.gnupg/*
# chmod 700 ~/.gnupg
#
gpg --export DBE07445 | sudo tee /etc/apt/keyrings/writeas.gpg > /dev/null
#
# 3. Verify key fingerprint (important security step)
gpg --show-keys /etc/apt/keyrings/writeas.gpg
#
# 4. Set proper permissions
sudo chmod 644 /etc/apt/keyrings/writeas.gpg
#
# 5. Add repository with signed-by parameter
echo "deb [signed-by=/etc/apt/keyrings/writeas.gpg] https://updates.writeas.org xenial main" | sudo tee /etc/apt/sources.list.d/writeas.list
#
# 6. Resume the 4 final actions in the WriteAs Linux Desktop Installation 
# https://write.as/apps/linux/get?success=1
Instructions for Debian/Ubuntu
sudo apt-get update && sudo apt-get install writeas-gtk
#
# 6a. Install fonts
sudo apt-get install fonts-lora fonts-open-sans fonts-hack

I hope someone who knows what they’re doing can clean that up to make it useful. For all us newbs, I would recommend waiting for commenters to proclaim those steps safe.

Results of the above:

Now we get to the problem, the WriteAs keys have expired.
Step 3. generates the following output:

pub rsa4096 2018-09-27 [SC]
131253B4381D5C87CF98F1611CE69F623D95E6E4
uid Write.as <hello@writeas.org>
sub rsa4096 2018-09-27 [S] [expired: 2020-09-26]
sub rsa4096 2018-09-27 [E]

Step 6. generates the following error:
W: OpenPGP signature verification failed: ``https://updates.writeas.org`` xenial InRelease: The following signatures were invalid: EXPKEYSIG C7DDC634DBE07445 Write.as <hello@writeas.org>
E: The repository ‘``https://updates.writeas.org`` xenial InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I have no way of knowing if my instructions failed to work, or WriteAs does indeed have expired keys. Hopefully someone who’s knowledgeable will comment.

Apologies if I’ve failed to follow the appropriate style manual for my submission, as I said, I’m a newb.

Regards,

Ben