Category: HowTos

Stuff that was hard to find & fix

  • How to configure LogRetention with journald

    Whenever you have a regular process, you definitely want to have some proper logging. But the very next thought after mentioning “logging” should be “LogRetention”. Especially when the process is executed automatically. No matter how often — as soon as the execution isn’t a one off, log rotation & log retention are a topic.

    LogRotate

    Especially on linux, it’s just so easy: use logrotate for example. Just one simple config file /settings and you’re set up with log rotation, compression and retention.

    journald & journalctl

    On my miniPC, I tried to avoid writing a lot of own log files but whent with journald and piped all logs into it. And never thought about retention. – Until today.

    I just set up another process and during testing, I noticed that I had more than 2.5gb of log files (journalctl --disk-usage) … dating back until very long. A quick check of the /etc/systemd/journald.conf confirmed that I missed some settings.

    journald has quite an elaborate set of options, just check the man page. Without big evaluation, I’ guess I’m fine with:

    Compress=yes
    SystemMaxUse=100M
    SystemMaxFileSize=5M
    MaxRetentionSec=1month

    Also, don’t forget to reload …

    sudo systemctl restart systemd-journald

    And don’t spend a second thinking about overflowing logs any more…

    Fediverse Reactions
  • How to fix: VLC long startup time

    Since a while I noticed that when I double clicked an MP4 file, VLC took really long (like several seconds) to open and show the file. Actually really annoingly long. But as I don’t watch a lot of movies, I never really bothered debugging it.

    BUT recently I came across on itsfoss.com and a tweet on X from VideoLan themselfes that explained the problem and solution:

    The Problem:

    This is because of a « bug » from Microsoft Defender in one update of Windows 11, who magically made VLC plugins cache quarantined by Windows.
    Reinstalling VLC or regeneration of the plugin cache will fix this.

    VLC Team on X

    The solution(s)

    Clearing the cache by one of the following steps:

    • Regenerate the plugin cache: launch with vlc.exe --reset-plugins-cache
    • Clear VLC’s cache under the user profile at %APPDATA%/VLC
    • Reinstall VLC from the official build (download here)

    But this won’t prevent Defender to possibly kick in again.

    Therefore, excluding vlc.exe (exclude the process, not just the file) in Microsoft Defender should be a sustainable solution!

    The exact clickpath might change. But it should be under (german):

    Einstellungen >
    Viren und Bedrohungsschutz >
    Einstellungen für Viren & Bedrohungsschutz - Einstellungen verwalten >
    (ganz unten) Ausschlüße hinzufügen oder entfernen

    Fediverse Reactions
  • How to shrink Docker Virtual Harddisk: docker_data.vhdx

    I just discovered that I had a >120 GB VHDX file in “%LOCALAPPDATA%\Docker\wsl\disk\docker_data.vhdx“).

    According to the description of Ahmed Moussa on dev.to (and some other articles), this is the virtual hard disk when using Docker for Windows and WSL. The Virtual Harddisk is dynamically increasing when needed. Unfortunately not decreasing.

    To compact and reclaim free space, perform those steps:

    1. Prune docker (see the FAQ)
      docker system prune -a --volumes
      this freed ~15 GB
    2. Compact the virtual Hard disk(s) (VHDX)
      • Stop Docker: “Quit Docker Desktop” from the Tray Icon
      • Shut Down WSL:
        wsl --shutdown
      • Compact the VHDX in Powershell (manual page):
        Optimize-VHD -Path "PATH/TO/VHDX" -Mode Full
        (Reclaimed ~85 GB)

    Fediverse Reactions
  • How to: Utiq Tracking sperren (Tracking via IP & Telefonnummer)

    Ich bin kein großer Fan davon, im Internet ge’tracked zu werden. Bisher dachte ich, Cookies löschen und Pi-Hole wären schon eine recht gute Lösung. — Dass aber noch direkt am Telefonanbieter auch noch ein Unternehmen steckt und cookieless track’ed, hat mich dann doch sehr überrascht.

    (more…)
    Fediverse Reactions
  • How to migrate Gmail to another Provider without Breaking the Mail History

    This is a practical how-to on moving email from Gmail to another provider.

    The main challenge is Gmail’s label system: one email can have multiple labels and all mails also appear in “All Mail”. Most other providers use folders instead, where an email can only exist in one place. If you migrate without taking this into account, you will most likely end up with duplicated mails or a messy folder structure.

    (more…)
    Fediverse Reactions
  • How to fix: Windows automatically goes to Dark Mode (after Oct 16th 2025)

    Problem: Windows automatically goes to dark or light mode, no matter what is set in the system settings. Even worse: when you change the mode in the system settings, windows switches back after a few seconds.

    (more…)
  • How to get RSS feeds for Releases / Tags on GitHub

    With growing amount of running selfhosted services, it becomes a bit tedious to keep track of new software releases.

    Luckily, GitHub offers RSS Streams for Releases and Tags (and some more). By adding those streams to the RSS reader, I see it in my RSS feeds when I have to take action.

    (more…)
    Fediverse Reactions
  • Farewell to my 11.5-Year-Old RaspberryPi Weather Station

    Eleven and a half years ago, I built my first RaspberryPi weather station using sensors from Tinkerforge. Today, I shut it down for good. Not because it failed — but because its job is done. It’s been replaced by a Netatmo setup, and unfortunately, I don’t need it anymore. But admitting that a project’s lifespan is over always takes some effort — well, to me at least.

    (more…)
    Fediverse Reactions
  • How to get the ‘<‘, ‘>’ and ‘|’ keys on a Dell Latitude 5300

    Since a while I am using a refurbed Dell Latitude 5300. I’m pretty happy with it. Just recently I was doing some stuff via SSH on my RaspberryPIs when I noticed that the Dell’s keyboard does not contain the ‘<‘ key. Not a big deal usually – just Linux Shell working is quite uncool without the ‘>’ and the pipe ‘|’ characters.

    (more…)
  • How to solve weird Docker Errors on Ubuntu

    After being so happy about all the services that I brought up last weekend, I forgot to do one thing: rebooting. Today I rebooted for some reason and the containers didn’t came up again.

    (more…)