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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62e61eb337c6424c03673e45590c9bc2e05816595cd7e7abd4de0d52d408f790
|
|
| MD5 |
fdfbe3660dd4a3d2bdfc53e4b9adbfb1
|
|
| BLAKE2b-256 |
472c2f62248aa75b74a5e4266e5407a85f66162012a56e7c66a78145b196b657
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
806633deafb0b87b88e8446fdd9ef249e256ea87676368fb44e94489cdeffaf9
|
|
| MD5 |
e7ac4f04de143a0b8069c6f4c1a29830
|
|
| BLAKE2b-256 |
ff8fcbe55022d210639da877e0148e3515e28c250659aabcb4ae3bed33138f9f
|