Skip to content

prawesh-12/sentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sentinel-logo

Sentinel

A GTK4 desktop application for managing systemd services on Linux start, stop, enable, disable, and pin your most used services, all from a clean GUI without running as root.


Preview

sentinel-logo sentinel-logo

Features

  • Auto-detects — all installed systemd services (enabled + disabled)
  • Start / Stop — services with live state (green = running, gray = stopped)
  • Enable / Disable — autostart on boot (red = enabled, gray = disabled)
  • Pin frequently used services — persisted across reboots (~/.config/sentinel/pinned.txt)
  • Pinned tab — dedicated view for your starred services
  • Pinned services float to the top — within Enabled/Disabled tabs
  • Real-time search — filter by service name
  • Refresh — button to re-query all service states
  • Privilege escalation — via pkexec (polkit) — no need to launch as root
  • Status bar — showing total / enabled / running counts and last refresh time

Requirements

Dependency Package (Ubuntu/Debian)
GTK4 dev headers libgtk-4-dev
CMake ≥ 3.16 cmake
pkg-config pkg-config
polkit policykit-1
systemd (pre-installed on most distros)

Install on Ubuntu/Debian:

sudo apt install libgtk-4-dev cmake pkg-config

Build

git clone https://github.com/prawesh-12/sentinel.git
cd sentinel

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

The binary is at build/sentinel.


Install (system-wide)

cd build
sudo cmake --install .

This installs:

  • Binary — /usr/local/bin/sentinel
  • Desktop entry — /usr/local/share/applications/sentinel.desktop
  • Icon — /usr/local/share/icons/hicolor/256x256/apps/sentinel.png

After install, Sentinel appears in your application launcher (GNOME, KDE, XFCE).


Uninstall

sudo rm /usr/local/bin/sentinel
sudo rm /usr/local/share/applications/sentinel.desktop
sudo rm /usr/local/share/icons/hicolor/256x256/apps/sentinel.png

Project Structure

Sentinel-process-controller/
├── src/
│   ├── main.cpp             # GtkApplication entry point
│   ├── ServiceManager.h/cpp  # systemctl parsing + pkexec execution
│   ├── ServiceRow.h/cpp      # per-service row widget (pin, start, enable)
│   ├── MainWindow.h/cpp      # window layout, sidebar tabs, CSS theme
│   ├── style.css             # GTK stylesheet — edit this to change the theme
│   └── style_css.h.in        # CMake template that embeds style.css at build time
├── CMakeLists.txt
├── sentinel.desktop
├── sentinel.png
└── .gitignore

How It Works

  • Service list is fetched with two batch systemctl calls (fast, no per-service popen loop):
    1. systemctl list-unit-files — enable state
    2. systemctl list-units --all — active state
  • Privileged commands (start, stop, enable, disable) run via pkexec systemctl … which triggers a polkit password prompt
  • Pinned services are saved to ~/.config/sentinel/pinned.txt and loaded on startup

Tech Stack

  • Language: C++17
  • GUI: GTK4 (raw C API)
  • Build: CMake
  • Service management: systemctl via popen() + pkexec

License

MIT — see LICENSE.

About

A desktop application for managing systemd services on Linux.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors