Skip to content

πŸ”₯ Linux GUI application to kill processes by port number with secure authentication - GTK3 network process manager for Ubuntu and Linux distributions

License

Notifications You must be signed in to change notification settings

iamsaad640/port-killer-gui-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Port Killer GUI - Linux Network Process Manager

Kill processes by port number with GUI authentication for Ubuntu and Linux distributions

A powerful, user-friendly GTK3-based GUI application designed for Linux system administrators, developers, and power users who need to quickly identify and terminate processes running on specific network ports. Built specifically for Ubuntu 24.04 with cross-compatibility for most Linux distributions.

Linux Ubuntu Python GTK License Stars Forks

✨ Key Features

🎯 Smart Port Management

  • Instant Port Scanning: Enter any port number (80, 3000, 8080, etc.) to discover running processes
  • Multi-Process Detection: Identifies all processes using a specific network port
  • Real-time Process Information: Shows PID, command name, user ownership, and connection details

πŸ” Secure Authentication

  • GUI Authentication Prompts: Uses PolicyKit (pkexec) for secure privilege escalation
  • Smart Permission Handling: Automatically detects when sudo privileges are required
  • User-Friendly Dialogs: Clear confirmation dialogs before process termination

⚑ Advanced Process Control

  • Graceful Termination: Attempts SIGTERM first, then SIGKILL if necessary
  • Bulk Process Management: Handle multiple processes on the same port
  • Safe Operation: Confirmation dialogs prevent accidental process killing
  • Status Feedback: Real-time success/error messages and operation status

πŸ–₯️ Modern GUI Experience

  • Clean GTK3 Interface: Native Linux desktop integration
  • Custom Application Icon: Professional port/network themed icon
  • Desktop Integration: Installable via applications menu
  • Responsive Design: Scalable interface for different screen sizes

πŸ“Έ Screenshots

Port Killer GUI Main Interface Main interface showing port input and process discovery

Process Management Process information display and termination controls

πŸš€ Quick Start

Prerequisites

  • Operating System: Ubuntu 24.04+ or any modern Linux distribution
  • Python: 3.12+ (pre-installed on Ubuntu 24)
  • GUI Framework: GTK 3.0 with PyGObject bindings
  • System Tools: lsof, pkexec (included by default)

One-Click Installation

# Clone the repository
git clone https://github.com/iamsaad640/port-killer-gui-linux.git
cd port-killer-gui-linux

# Install to applications menu
./install.sh

Manual Installation

# Make executable
chmod +x kill_port_gui.py run.sh install.sh

# Run directly
./run.sh

# Or with Python
python3 kill_port_gui.py

πŸ“– Usage Guide

Basic Operation

  1. Launch Application: Find "Port Killer" in your applications menu or run ./run.sh
  2. Enter Port Number: Type the port number (e.g., 3000, 8080, 80)
  3. Discover Processes: Click "Find Process" or press Enter
  4. Review Information: Check process details in the information panel
  5. Terminate Process: Click "Kill Process" and confirm the action
  6. Authentication: Enter your password if prompted for elevated privileges

Common Use Cases

🌐 Web Development

  • Kill Development Servers: Instantly terminate React (3000), Next.js (3000), Vue (8080), or Angular dev servers
  • Stop Backend Services: Kill Express.js, Flask, Django, or Node.js applications
  • Docker Container Cleanup: Terminate processes from Docker containers using host ports

βš™οΈ System Administration

  • Web Server Management: Stop Apache (80, 443), Nginx, or other web servers
  • Database Cleanup: Terminate MySQL (3306), PostgreSQL (5432), MongoDB (27017) processes
  • Network Service Control: Manage SSH (22), FTP (21), Telnet (23) connections

πŸ”§ Development & Testing

  • Port Conflict Resolution: Quickly free up ports blocked by crashed applications
  • Testing Environment Cleanup: Clear development/staging server processes
  • Microservices Management: Control individual service instances by port

πŸ”’ Security Features

Authentication System

  • PolicyKit Integration: Uses pkexec for secure GUI authentication
  • Privilege Escalation: Automatically detects when administrator rights are needed
  • User Context Awareness: Direct termination for own processes, authentication for others

Safety Mechanisms

  • Confirmation Dialogs: Prevents accidental process termination
  • Process Information Display: Shows detailed process info before killing
  • Graceful Termination: SIGTERM β†’ SIGKILL progression for safe cleanup
  • Error Handling: Comprehensive error reporting and recovery

πŸ› οΈ Troubleshooting

Common Issues

Issue Solution
lsof command not found sudo apt install lsof
Authentication fails sudo apt install policykit-1
No GUI display Ensure graphical environment with GTK support
Permission denied Run with proper user permissions or use sudo
Port not found Verify port number and check if process is actually running

System Requirements

  • Minimum RAM: 256MB
  • Disk Space: 50MB
  • Display: X11 or Wayland with GTK 3.0 support
  • Network Tools: lsof, netstat (usually pre-installed)

πŸ—οΈ Technical Architecture

Core Components

  • Frontend: GTK 3.0 with PyGObject bindings
  • Backend: Python 3.12+ with subprocess management
  • Authentication: PolicyKit (pkexec) for secure privilege escalation
  • Process Discovery: lsof command-line utility integration
  • Signal Handling: POSIX signals (SIGTERM, SIGKILL)

Dependencies

# Core Dependencies
gi (PyGObject)          # GTK 3.0 bindings
subprocess             # Process management
os                     # System operations
signal                 # POSIX signal handling

# System Tools
lsof                   # Process discovery
pkexec                 # GUI authentication

🀝 Contributing

We welcome contributions! Here's how you can help:

  • πŸ› Bug Reports: Report issues via GitHub Issues
  • ✨ Feature Requests: Suggest new functionality
  • πŸ”§ Code Contributions: Submit PRs for improvements
  • πŸ“– Documentation: Improve README and code comments
  • 🌍 Translations: Add support for other languages

Development Setup

git clone https://github.com/iamsaad640/port-killer-gui-linux.git
cd port-killer-gui-linux
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt  # If requirements file exists

πŸ“Š Performance

  • Startup Time: <2 seconds on modern hardware
  • Memory Usage: ~15-25MB RAM
  • CPU Impact: Minimal (<1% during scanning)
  • Port Scan Speed: Instant for single ports
  • Multi-Process Handling: Concurrent termination support

🌟 Alternatives & Comparisons

Tool GUI Cross-Platform Authentication License
Port Killer GUI βœ… GTK3 Linux/Unix PolicyKit MIT
kill -9 $(lsof -t -i:PORT) ❌ CLI Unix/Linux sudo Built-in
fuser -k PORT/tcp ❌ CLI Linux sudo Built-in
Task Manager (Windows) βœ… Native Windows Only UAC Proprietary

πŸ“„ License

MIT License

Copyright (c) 2025 Port Killer GUI Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

πŸ”— Related Projects


⭐ Star this repository if it helped you manage network processes efficiently! ⭐

Report Bug β€’ Request Feature β€’ Contribute β€’ Documentation

Built with ❀️ for the Linux community

Releases

No releases published

Packages

No packages published