Wednesday, March 22, 2023

DOC to PDF

Found an old drive. Had some docs. Who would upload these to Drive for online scanning? Had to install LibreOffice for the offline CLI solution from this page.

lowriter --convert-to pdf --outdir [output-directory] input-doc-or-docx-file

I left off the directory flag and it just put the PDF in the same directory the DOC file was in. Obviously a person can just open each document after the damage of installing the entire 700Mb LibreOffice suite for a f*cking CLI command, but that's even worse.

I will of course have zero use of use of LibreOffice proper, so this command line option is very expensive in terms of disk space, but so far only way I know to offline convert old DOC's.

Saturday, March 18, 2023

[solved] update a dormant system - arch

When a system lies around, the Arch update will of course be large. Let's say a system isn't updated for 3 years. Pacman might indicate that, say 1.5G of updates are required. Usually it can be done, but the keyserver may be a bottleneck and failure point. This is a new development. There's probably a way to update Linux without checking package integrity, but I feel that's going to ultimately be a problem. I first try everything with keys. I covered most of this in an earlier post, but the post here focuses particularly on dormant systems.

first fail

Supposing the update fails based on keys, the nice first thing do is get rid of excess packages

# pacman -Sc
Packages to keep:
All locally installed packages

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove all other packages from cache? [Y/n] y
removing old packages from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] y
removing unused sync repositories...
# du -sh /var/cache/pacman
1.5G /var/cache/pacman

That last command is just to see how large the current install is without the updates. Now go after the keys.

All the apps have PGP keys; sometimes pacman won't update due to key conflicts or expiry. Usual cure...

# pacman -Sy archlinux-keyring -
...after which try the more nuclear option
# pacman-key --refresh-keys