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
pgrepandpkillavailable 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 forpgrep -f- if omitted, the full command line (
PROGRAM + args) is used
- if omitted, the full command line (
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
- Checks process count using
pgrep -c -f. - If already running, shows Kill / Start anyway dialog.
- 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.
Metadata
Release files for startuniq 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| startuniq-0.0.5.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| startuniq-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / startuniq-0.0.5.tar.gz
| Download URL | startuniq-0.0.5.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62e61eb337c6424c03673e45590c9bc2e05816595cd7e7abd4de0d52d408f790
|
|
BLAKE2b-256 checksum How to use checksums |
472c2f62248aa75b74a5e4266e5407a85f66162012a56e7c66a78145b196b657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.1
|
Release files / startuniq-0.0.5-py3-none-any.whl
| Download URL | startuniq-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
806633deafb0b87b88e8446fdd9ef249e256ea87676368fb44e94489cdeffaf9
|
|
BLAKE2b-256 checksum How to use checksums |
ff8fcbe55022d210639da877e0148e3515e28c250659aabcb4ae3bed33138f9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.1
|