Michael Vorburger.ch Blog

2023

Plain text accounting with Beancount

January 13, 2023
Plain text accounting with Beancount image

Plain text accounting with Beancount

Plain text accounting is the idea of managing personal finances (or perhaps a small business, or club, or whatever) using a scriptable, command-line-friendly open source accounting software keeping all related data in plain text files which are easy to version control e.g. with git.

This is an alternative to using something like e.g. Intuit QuickBooks, Zoho Books, Xero, etc. or even just whatever one of your banks offers you built-in.

Read more →

2022

The Need for Speed (Part #1)

November 27, 2022
The Need for Speed (Part #1) image

The Need for Speed (Part #1)

The Past

For the past 20 years, Swisscom was my ISP at home, and I had a (now) Swisscom blue Internet L subscription for Residential Customers.

The bandwidth that gave me for the last couple of years was 1 Gigabit per second (Gbps). One day when I logged in to my ISP to pay a bill, there was a message:

“Technology upgrade: With a change to the new fiber optic standard, you can achieve a speed of up to 10 Gbit/s without a monthly fee and extra cost.”

Read more →

Fedora Upgrades

October 1, 2022
Fedora Upgrades image

Fedora Upgrades

Following Fedora Docs’ DNF System Upgrade works reasonably well.

Here are how I resolve a few issues I run into every time I upgrade.

“The password you use to log in to your computer no longer matches that of your login keyring.”

With Automatic Login, the error message above appears e.g. when using GNOME Tweaks to auto-start Brave.

Work around it by using the Passwords and Keys (Seahorse) app to delete the Brave Safe Storage. This will break Brave’s Saved Passwords and Sync; to fix that, go to brave://sync-internals to Disable Sync (Clear Data), close Brave, and set up Sync again.

Read more →

Fish is a **GREAT** interactive shell, but... not yet suitable for scripting! :-((

September 11, 2022
Fish is a **GREAT** interactive shell, but... not yet suitable for scripting! :-((  image

Fish is a GREAT interactive shell, but… not yet suitable for scripting! :-((

I almost :) started writing some shell scripts in Fish instead of Bash, but then discovered https://github.com/fish-shell/fish-shell/issues/510.

This seems like a massive feature gap in Fish, at least to me. I CANNOT LIVE without set -e in Bash. ALL my scripts everywhere have that (code search seems to miss a lot of them).

Fish is great as an interactive Shell, but without this feature, I cannot start using it for more scripting.

Read more →

How to launch a CLI tool in a new terminal window

September 10, 2022
How to launch a CLI tool in a new terminal window image

How to launch a CLI tool in a new terminal window

Here is one way to run a CLI process in a new window, make closing that window kill that process, yet wait for the user when said process exits, e.g. not to loose some start-up error message:

gnome-terminal -- bash -c 'ls / ; read -p "Press Enter to close..."'

I used this as follows for qemu-system-x86_64 in this script:

export KERNEL
gnome-terminal -- bash -c '\
  qemu-system-x86_64 \
    (...)
    -serial stdio  -nographic  -display none \
    -kernel "$KERNEL" ; \
  read -p "QEMU has exited - press any key to close this window..."'

Note the export - that’s needed for those environment variables to work as arguments to the process in the gnome-terminal.

Read more →

Debugging Linux Start-Up Speed Performance Issues

September 9, 2022
Debugging Linux Start-Up Speed Performance Issues image

Debugging Linux Start-Up Speed Performance Issues

Today while LearningLinux I noticed that my ArchLinux VMs started as fast as always, but it seemed to take longer and longer for sshd to be ready. This clarified what was happening:

$ systemd-analyze
Startup finished in 1.270s (kernel) + 42.586s (userspace) = 43.857s
graphical.target reached after 42.585s in userspace.

$ systemd-analyze blame
41.769s pacman-init.service
29.292s reflector-init.service
 1.198s systemd-networkd-wait-online.service
  601ms dev-vda2.device
  393ms ldconfig.service
  360ms sshdgenkeys.service
  234ms systemd-networkd.service
  168ms systemd-tmpfiles-setup.service
  155ms systemd-timesyncd.service
  145ms systemd-resolved.service
  102ms systemd-udev-trigger.service
   94ms systemd-logind.service
   93ms systemd-udevd.service
   82ms systemd-machine-id-commit.service
   79ms systemd-journal-catalog-update.service
   69ms user@1000.service
   54ms systemd-tmpfiles-setup-dev.service
   43ms systemd-journald.service
   42ms systemd-journal-flush.service
   37ms systemd-tmpfiles-clean.service
   37ms sys-kernel-tracing.mount
   36ms kmod-static-nodes.service
   36ms dev-mqueue.mount
   36ms modprobe@configfs.service
   36ms sys-kernel-debug.mount
   36ms modprobe@drm.service
   35ms dbus.service
   35ms modprobe@fuse.service
   35ms dev-hugepages.mount


$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @42.585s
└─multi-user.target @42.585s
  └─sshd.service @42.585s
    └─pacman-init.service @814ms +41.769s
      └─basic.target @811ms
        └─sockets.target @811ms
          └─dbus.socket @810ms
            └─sysinit.target @805ms
              └─systemd-update-done.service @798ms +5ms
                └─ldconfig.service @404ms +393ms
                  └─local-fs.target @402ms
                    └─run-user-1000.mount @20.308s
                      └─local-fs-pre.target @402ms
                        └─systemd-tmpfiles-setup-dev.service @346ms +54ms
                          └─systemd-sysusers.service @314ms +30ms
                            └─systemd-firstboot.service @293ms +20ms
                              └─systemd-remount-fs.service @258ms +29ms
                                └─systemd-journald.socket @242ms
                                  └─-.mount @237ms
                                    └─-.slice @237ms

Huh, so critical-chain shows that sshd was blocked by pacman-init… we can see that from the Before=sshd.service here:

Read more →

Linux Kernel Random Number Entropy

September 9, 2022
Linux Kernel Random Number Entropy image

Linux Kernel Random Number Entropy

The Linux Kernel uses “entropy” to generate random numbers:

$ cat /proc/sys/kernel/random/entropy_avail
256

$ cat /proc/sys/kernel/random/poolsize
256

$ cat /proc/sys/kernel/random/write_wakeup_threshold
256

This 256 seems to have recently changed.

Older blog posts state that 256 available entropy is too low.

I doubt that on modern 2022 Kernels, such as a 5.17 from Fedora 34 or a 5.18 in Fedora 36, this is still accurate. It now actually remains at 256 forever, even with keyboard and mouse and disk events; even a restart does not budge it.

Read more →

Fedora Silverblue

August 16, 2022
Fedora Silverblue image

Fedora Silverblue

See also remaining ToDo (private).

OSTree

rpm-ostree install kitty
rpm-ostree status
systemctl reboot

Flatpack

As per https://github.com/vorburger/vorburger-dotfiles-bin-etc#on-fedora-silverblue, Apps from Flatpack will have certain limitations, such as that:

Troubleshooting

The blocked updates of 2022-08

As per https://fedoramagazine.org/manual-action-required-to-update-fedora-silverblue-kinoite-and-iot-version-36/, after running e.g. rpm-ostree install kitty as e.g. in my ostree-install-gui.sh, rpm-ostree status shows what’s currently running, and what it should boot into on the next systemctl reboot:

$ rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
         error: Bootloader write config: grub2-mkconfig: Child process exited with code 1
         check `journalctl -b -1 -u ostree-finalize-staged.service`
Deployments:
● fedora:fedora/36/x86_64/silverblue
                  Version: 36.1.5 (2022-05-04T18:42:06Z)

But beware that that Warning on top means that install won’t work! The following workaround did the trick for me:

Read more →

DAppNode

March 13, 2022
DAppNode image

DAppNode

https://dappnode.io

ToDo

  1. ipfs.dappnode with HTTPS? See https://github.com/dappnode/DAppNode/issues/406, and below.
  2. Fix http://alice.eth etc. as it’s still NOK when now that IPFS works, see https://github.com/dappnode/DAppNode/issues/492
  3. Install http://dappnode.local/#/installer/prysm.dnp.dappnode.eth
  4. http://dappnode.local/#/installer More packages to install?
  5. http://dappnode.local/#/community => https://sourcecred.dappnode.io/#/explorer PAN?
  6. DAppNode DApp list
  7. Configure /etc/wireguard/wg0.conf to “route” / “lookup” (?) ONLY .eth and .dappnode domain names through that VPN? Test by shutdown DAppNode.
  8. (Re-)install and configure http://dappnode.local/#/packages/rotki.dnp.dappnode.eth/info
  9. git server (local at first, then on IPFS); e.g. on https://github.com/linuxserver?
  10. Backups, for git server and other, on IPFS

Use

  • brave://settings/ipfs
  • brave://ipfs-internals/
  • If using Brave Local IPFS Node:
    • http://127.0.0.1:45005/webui
    • brave://settings/ipfs/peers

Manage & Maintenance

Set up

As per official documentation, and then:

Read more →

2021

[Krypton](https://krypt.co)

May 2, 2021
[Krypton](https://krypt.co) image

Krypton

See https://krypt.co and sources on https://github.com/kryptco.

https://krypt.co/start/ => https://krypt.co/ext/ for U2F Browser Extension, if interested.

More on https://krypt.co/docs.

Setup SSH

Install the Android App, and in its Settings (Krypton Core) enable [X] Developer Mode (and review other Settings; perhaps Disable Google Analytics). Now on workstation/desktop host:

curl https://krypt.co/kr | sh

kr pair

and scan the displayed QR code in the PAIR tab on the App. The printed SSH public key is ~/.ssh/id_krypton.pub (also kr me), and can be put e.g. on https://github.com/settings/keys or on a server (also using kr add <user>@<server>) as per https://krypt.co/docs/start/upload-your-ssh-publickey.html.

Read more →
Load more...