explaingit

darynongera/gotcha

Analysis updated 2026-05-18

44CAudience · developerComplexity · 2/5Setup · moderate

TLDR

A small Linux background tool that watches desktop notifications from a chosen app and sender, and logs matching messages to a plain text file.

Mindmap

mindmap
  root((repo))
    What it does
      Watches D-Bus notifications
      Filters by app and sender
      Logs matches to a file
    Tech stack
      C
      D-Bus
      systemd
    Use cases
      Keep a text record of chat messages
      Run as a background service
      Audit notification history
    Audience
      Linux users
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Keep a running text log of notifications from one specific contact or app.

USE CASE 2

Run a lightweight always-on notification watcher as a systemd user service.

USE CASE 3

Debug D-Bus notification eavesdropping policies on a Linux desktop.

USE CASE 4

Archive message previews that would otherwise disappear once a popup closes.

What is it built with?

CD-BussystemdLinux

How does it compare?

darynongera/gotchadeepanwadhwa/samosa-chatfelixrieseberg/relic
Stars444545
LanguageCCC
Setup difficultymoderatemoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires installing D-Bus development headers and may need session-bus policy changes to allow eavesdropping.

The project does not state a license, so default copyright rules apply and reuse permissions are unclear.

In plain English

gotcha is a small Linux tool, written in C, that watches for desktop notifications and writes matching ones to a plain text log file. It listens on the D-Bus system that Linux desktops use to send popup notifications, filters those by which app sent them and who the sender is, and appends anything that matches to a log in a readable format like a timestamp followed by the sender and the message text. A common use is watching for messages from a specific contact in an app such as WhatsApp Linux, so you get a running text record of what was said even after the notification popup disappears. You start it by pointing it at an app name and a sender to watch for, and an output file to write matches to. It can be run once from the terminal to test it, or installed as a persistent background service using systemd, so it keeps running after you log out or reboot, restarts itself if it crashes, and starts automatically the next time you log in. Getting it running means installing a few development packages first, such as build tools and the D-Bus development headers, which the README gives separate commands for on Debian and Ubuntu, Fedora, and Arch systems. After that you compile it with a single make command, or by calling gcc directly with the D-Bus library flags. Installing it as a service involves copying a provided service file into your systemd user config folder and enabling it. The README includes a troubleshooting section for the most common snag: some Linux desktop configurations block a program from eavesdropping on notifications meant for other apps unless the policy explicitly allows it. It explains how to check whether your system is blocking this using the dbus-monitor tool, and where to look in the system's D-Bus policy files. It also notes that not every app puts the sender's name in the same place, so matching by name alone may need adjusting depending on which chat app you are watching. The project does not state a license.

Copy-paste prompts

Prompt 1
Help me build and install gotcha on my Linux distro using its Makefile.
Prompt 2
Walk me through setting up gotcha as a systemd user service that survives reboot.
Prompt 3
Explain why dbus-monitor sees nothing and how to fix the eavesdrop policy for gotcha.
Prompt 4
Show me how to adjust gotcha's sender matching for a chat app that puts the name in the body instead of summary.

Frequently asked questions

What is gotcha?

A small Linux background tool that watches desktop notifications from a chosen app and sender, and logs matching messages to a plain text file.

What language is gotcha written in?

Mainly C. The stack also includes C, D-Bus, systemd.

What license does gotcha use?

The project does not state a license, so default copyright rules apply and reuse permissions are unclear.

How hard is gotcha to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is gotcha for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.