Skip to main content

startuniq

startuniq starts a program only when an equivalent process is not already running. If it detects a running instance, it shows a small dialog that lets you:

  • Kill existing instance(s), or
  • Start anyway

It works for both:

  • remote hosts (via SSH), and
  • localhost (runs directly, no SSH)

Useful for single-instance tools such as Firefox, VS Code, Zim, Phoebus, and similar apps.

Requirements

  • Python 3.7+
  • Linux/Unix-like system
  • pgrep and pkill available on target host
  • Tkinter (for the confirmation dialog)

Installation

pip install startuniq

Or from this folder:

pip install .

Usage

python -m startuniq -s HOST [-p PROCESS_PATTERN] PROGRAM [PROGRAM_ARGS ...]

Arguments

  • -s, --server: target host (default: localhost)
  • -p, --process: process match pattern for pgrep -f
    • if omitted, the full command line (PROGRAM + args) is used
  • PROGRAM [PROGRAM_ARGS ...]: command to launch

Examples

Start Firefox on remote host:

python -m startuniq -s myhost firefox

Start VS Code locally (no SSH):

python -m startuniq code /path/to/project

Behavior summary

  1. Checks process count using pgrep -c -f.
  2. If already running, shows Kill / Start anyway dialog.
  3. If not running (or user chooses Start anyway), launches the program.

Notes

  • For remote hosts, command checks and launches happen through SSH.
  • For localhost, checks and launches run directly on the local machine.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

startuniq-0.0.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

startuniq-0.0.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file startuniq-0.0.5.tar.gz.

File metadata

  • Download URL: startuniq-0.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.1

File hashes

Hashes for startuniq-0.0.5.tar.gz
Algorithm Hash digest
SHA256 62e61eb337c6424c03673e45590c9bc2e05816595cd7e7abd4de0d52d408f790
MD5 fdfbe3660dd4a3d2bdfc53e4b9adbfb1
BLAKE2b-256 472c2f62248aa75b74a5e4266e5407a85f66162012a56e7c66a78145b196b657

See more details on using hashes here.

File details

Details for the file startuniq-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: startuniq-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.1

File hashes

Hashes for startuniq-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 806633deafb0b87b88e8446fdd9ef249e256ea87676368fb44e94489cdeffaf9
MD5 e7ac4f04de143a0b8069c6f4c1a29830
BLAKE2b-256 ff8fcbe55022d210639da877e0148e3515e28c250659aabcb4ae3bed33138f9f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page