NCDU Shell tool with GUI for cleanup your disk

When managing disk space, having a quick and efficient tool at your fingertips can be a game-changer. Enter ncdu—a lightweight, terminal-based disk usage analyzer that provides an interactive and visual overview of your file system directly from the command line. What Is ncdu? ncdu (NCurses Disk Usage) is a command-line utility that scans your directories and files to show you exactly where your disk space is being used. With its ncurses-based interface, ncdu offers an intuitive way to navigate through large file systems, making it easier to identify and clean up space hogs. ...

April 1, 2025 · 2 min · thomasf

Creating a Shared Internet Connection for Gaming During Vacations

Why You Need This Quick WiFi Sharing Solution When staying at holiday parks or vacation rentals, internet connectivity is often limited or unreliable. This can be frustrating when you want to enjoy some gaming time with your kids. The solution? Create your own WiFi sharing setup using two wireless interfaces – your laptop’s built-in WiFi and a USB WiFi dongle. The Perfect Setup in 3 Simple Steps Requirement: a working internet connection. In my case: LandalPremiumWifi ...

February 28, 2025 · 2 min · thomasf

Automated Password Typing in Linux with ydotool

When working with remote desktop sessions in Linux, especially nested ones (like RDP inside Citrix), typing passwords can be challenging. Special characters and capital letters often don’t transmit correctly, leading to frustrating login attempts. This guide presents a robust solution using ydotool that handles all password characters correctly, even in nested remote sessions. The Challenge Common issues when typing passwords in remote sessions include: Shift key states not being properly recognized Special characters getting mangled Inconsistent behavior with capital letters Characters being dropped or misinterpreted The Solution Our solution uses ydotool, a modern input automation tool for Wayland. The script we’ve developed handles every possible password character correctly by: ...

January 16, 2025 · 3 min · thomasf
windows-powershell-ise-icon

PRTG Monitor Azure Backups

I adapted an existing solution from 2azure.nl for monitoring Azure Backup status through PRTG in our environment. I did some refactoring and I like to share the code with you. Run the script in PRTG with these parameters: -Password "XXXXX" -applicationid "XXXXX" -TenantId "XXXXX" -VaultName "XXXXX" -ResourceGroupName "XXXXX" The complete script is available in the code block below." param( [Parameter(Mandatory = $true)] [string]$Password, [Parameter(Mandatory = $true)] [string]$ApplicationId, [Parameter(Mandatory = $true)] [string]$TenantId, [Parameter(Mandatory = $true)] [string]$VaultName, [Parameter(Mandatory = $true)] [string]$ResourceGroupName ) # Run Once: Install required modules # Install-Module -Name Az.Accounts # Install-Module -Name Az.RecoveryServices Import-Module Az.Accounts Import-Module Az.RecoveryServices # Login $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential($ApplicationId, $securePassword) Connect-AzAccount -Credential $credential -ServicePrincipal -TenantId $TenantId | Out-Null # Access specific vault $vault = Get-AzRecoveryServicesVault -Name $VaultName -ResourceGroupName $ResourceGroupName if ($vault) { # Set vault context $vault | Set-AzRecoveryServicesVaultContext # Check backups last 24 hours, only Backup operations $jobs = Get-AzRecoveryServicesBackupJob -From (Get-Date).AddDays(-1).ToUniversalTime() | Where-Object { $_.Operation -eq "Backup" } | Select-Object Status, WorkloadName $completed = ($jobs | Where-Object {$_.Status -eq 'Completed'}).Count $failed = ($jobs | Where-Object {$_.Status -eq 'Failed'}).Count $running = ($jobs | Where-Object {$_.Status -eq 'InProgress'}).Count # Get unique workload names $workloadNames = ($jobs | Select-Object -ExpandProperty WorkloadName -Unique) -join ', ' # Output for PRTG if ($failed -eq 0 -and $completed -gt 0) { $result = "<prtg> <result> <channel>Completed jobs</channel> <value>$completed</value> <LimitMode>1</LimitMode> <LimitMinError>1</LimitMinError> <LimitErrorMsg>No completed backups found!</LimitErrorMsg> </result> <result> <channel>Failed jobs</channel> <value>$failed</value> <LimitMode>1</LimitMode> <LimitMaxError>0</LimitMaxError> <LimitErrorMsg>Failed backup jobs detected!</LimitErrorMsg> </result> <result> <channel>Running jobs</channel> <value>$running</value> <LimitMode>1</LimitMode> <LimitMaxWarning>1</LimitMaxWarning> <LimitMaxError>2</LimitMaxError> <LimitWarningMsg>Multiple backup jobs running</LimitWarningMsg> <LimitErrorMsg>Too many backup jobs running!</LimitErrorMsg> </result> <text>Backup successful in vault: $($vault.Name) for workloads: $workloadNames</text> </prtg>" } else { $result = "<prtg> <error>1</error> <text>Backup failed in vault: $($vault.Name), failed jobs: $failed, workloads: $workloadNames</text> </prtg>" } } else { $result = "<prtg> <error>1</error> <text>Could not find vault $VaultName in resource group $ResourceGroupName</text> </prtg>" } Write-Host $result

January 5, 2025 · 2 min · thomasf
A_powerful_superhero,_wearing_a_red_cape_and_blue_

How to Set Up Automatic Security Updates on Debian and Ubuntu

Keeping your Ubuntu server secure and up-to-date is crucial to minimizing the risk of vulnerabilities. One effective way to ensure timely patching of critical security issues is to enable automatic updates using unattended-upgrades. Here’s how to configure it step by step. Cronjob Onliner (every sunday 3.00AM): # Check current cronjobs sudo crontab -l # Add cronjob for weekly updates with reboot (Sunday 3:00 AM) (sudo crontab -l; echo "0 3 * * 0 /usr/bin/apt-get update && DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get --assume-yes upgrade && $(whereis -b reboot | cut -d' ' -f2)") | sudo crontab - # Verify sudo crontab -l Or the real deal :) ...

September 18, 2024 · 2 min · thomasf
settings

Monitoring Event Logs in Windows with PowerShell: A Script for Recent Events

When managing a Windows environment, analyzing event logs is an essential part of troubleshooting. Windows logs a wide range of system, security, and application events, but sometimes specific problems can arise without easily accessible evidence. For example, when tracking down recent events, it can be cumbersome to manually check each log for relevant entries. In this post, I’ll share a simple PowerShell script that extracts recent log entries across all event logs—not just the default System, Application, and Security logs. This script is particularly useful when you need to quickly review what’s been happening on your machine over the last 5 minutes. ...

September 10, 2024 · 4 min · thomasf
edit disks

Extend Linux ext4 disk with cfdisk

There are times when you need to extend a disk to accommodate more data or improve performance. While using UI tools to extend disks can make the process easier and more intuitive, there are situations where these tools aren’t available. In such cases, knowing how to extend a disk using command-line tools can be invaluable. This post will guide you through the process of extending a disk without the need for graphical interfaces like gparted. ...

August 31, 2024 · 2 min · thomasf

Optimizing RDP Performance on Linux: My Best Settings with xfreerdp

XfreeRDP3 If you’re like me and rely heavily on Remote Desktop Protocol (RDP) to connect to Windows servers from a Linux environment, you know how crucial performance can be. After experimenting with numerous settings, I’ve found a configuration that delivers the best performance using xfreerdp. Here’s a breakdown of the settings that worked wonders for me. Why xfreerdp? xfreerdp is an open-source RDP client that offers a plethora of customization options, making it a powerful tool for Linux users needing to connect to Windows servers. Its flexibility allows for fine-tuning, which is essential for optimizing performance. ...

July 27, 2024 · 2 min · thomasf

NixOS and Sway

Currently, I am experimenting with NixOS and Sway. NixOS is a Linux operating system that allows you to build and manage your system using a single configuration file. Sway is a tiling window manager designed for Wayland, offering a dynamic and efficient workspace. This article is a work in progress. I plan to share my setup and configuration details, but for now, this article serves as a draft to document my journey. ...

May 27, 2024 · 2 min · thomasf

PRTG articles to build custom sensors

In recent times, I’ve dedicated a significant portion of my efforts to developing custom PRTG sensors. To assist others who might be interested in this area, I’ve decided to create this blog post where I will compile a collection of useful links. These links lead to various articles and resources that I’ve found invaluable in my journey of crafting personalized sensors for the PRTG network monitoring tool. This curated list is intended to serve as a helpful guide for anyone looking to explore the possibilities of custom sensor creation in PRTG. ...

May 4, 2024 · 1 min · thomasf