Skip to content

Repository files navigation

fat32-repair-notifier

Automatic detection and repair notification for FAT32 USB flash drives on Linux desktops.

Dependencies: libnotify polkit dosfstools systemd udev

fat32-repair-notifier monitors newly attached removable FAT32 drives using udev and checks whether the filesystem was improperly unmounted. If a dirty filesystem is detected, a desktop notification appears with an option to repair the drive using fsck.fat.

Features

  • Automatic detection of newly inserted FAT32 USB drives
  • Dirty bit detection using fsck.fat
  • Desktop notifications via notify-send
  • Optional filesystem repair using pkexec
  • Lightweight and dependency-free shell implementation
  • No background daemon required

How It Works

USB drive inserted
        ↓
udev rule triggers
        ↓
systemd-run starts checker
        ↓
fsck.fat checks dirty bit
        ↓
Desktop notification appears
        ↓
User can repair filesystem

Notes

  • Only FAT32 (vfat) filesystems are checked
  • MTP/PTP smartphones are ignored
  • Existing mounted filesystems are skipped
  • The project is intentionally minimal and lightweight

Notification Support

A running Freedesktop-compatible notification daemon is required.

Examples:

  • xfce4-notifyd
  • mate-notification-daemon
  • notification-daemon
  • dunst

Without a notification daemon, notify-send will not display messages.

Tested Desktop Environments

  • Budgie
  • XFCE
  • LXDE
  • MATE

Recommendation

Disabling automatic opening of removable drives may improve repair reliability on some desktop environments.

Keep your flash drives clean 😄

About

Automatic detection and repair of FAT32 USB flash drives

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages