Registry / http-networking / vncdotool

vncdotool

JSON →
library1.3.0pypypiunverified

vncdotool is a command-line VNC client that also provides a Python API for programmatic interaction with VNC servers. It enables automation of VNC sessions, including screen capture, sending keystrokes, and executing commands, making it useful for testing, system administration, and CI/CD pipelines. The library is currently at version 1.3.0 and has an active but irregular release cadence.

pip install vncdotool
INSTALL
IMPORT
SIG · VNCDOTOOL
V
vncdotool
http-networkingpythonv1.3.0
Install
5.7s avg
Import
Disk
91MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 88.3MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.7s · import 0.000s · 89MB
91MB installed
● package 91MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VNCClient
from vncdotool import VNCClient
from vncdotool import VNCClient

This quickstart demonstrates how to connect to a VNC server using the `VNCClient` API, capture a screenshot, type some text, and then disconnect. It uses environment variables for host, port, and password for secure credential handling, falling back to common defaults.

import os from vncdotool.api import VNCClient # Example: Connect to a VNC server, capture screen, type text, and disconnect host = os.environ.get('VNC_HOST', 'localhost') port = int(os.environ.get('VNC_PORT', '5900')) password = os.environ.get('VNC_PASSWORD', '') try: client = VNCClient(host=host, port=port, password=password) print(f"Successfully connected to VNC server at {host}:{port}") # Capture a screenshot screenshot_path = 'screenshot.png' client.captureScreen(screenshot_path) print(f"Screenshot saved to {screenshot_path}") # Type some text client.keyPress('f12') # Example: Press F12 client.type('Hello, VNC World!') # Wait for a brief moment client.pause(1000) # Pause for 1 second (1000ms) except Exception as e: print(f"An error occurred: {e}") finally: if 'client' in locals() and client.connected: client.disconnect() print("Disconnected from VNC server.")
vncdotool --version
Debug
Known issues
breakingPython 2.x support was dropped in version 1.1.0. Attempting to use vncdotool 1.1.0 or newer with Python 2 will result in `SyntaxError` or `ImportError`.
fix
Upgrade your Python environment to Python 3 (3.6+ is recommended for modern features and type hinting). Reinstall vncdotool in the Python 3 environment.
affects: >=1.1.0
gotchaOlder versions of `vncdotool` (prior to 1.2.0) had issues with `api.shutdown()` and `api.disconnect()` potentially raising exceptions or failing silently. This could lead to unhandled errors or zombie connections.
fix
Upgrade to vncdotool version 1.2.0 or later to benefit from the fixes related to these API calls. Always ensure proper `try...finally` blocks for connection management.
affects: <1.2.0
gotcha`vncdotool` replaced `PIL` (Python Imaging Library) with `Pillow` as its imaging dependency in version 0.9.0. Codebases explicitly depending on `PIL` might encounter import errors or deprecated functionality.
fix
Ensure your project uses `Pillow` for image manipulation and avoids direct `PIL` imports. If you were manipulating images returned by `vncdotool`, ensure your code is compatible with `Pillow`'s API.
affects: >=0.9.0
gotchaThe default behavior introduced in version 0.9.0 is to pause for 10ms between commands. While this improves compatibility with some VNC servers, it might slightly slow down scripts expecting immediate command execution.
fix
If your script requires faster command execution or you experience unexpected delays, you can explicitly set the pause duration using `client.pause(milliseconds)` or `client.setTimeout(milliseconds)` methods within the API.
affects: >=0.9.0
Upgrade
Version history
1.3.0latest on PyPI · released Apr 3, 2026
Audit
Dependencies
PillowrequiredImage processing and screen capture.
pycryptodomexrequiredVNC DES authentication (replaces internal implementation).
Agent activity
59 hits · last 30 days
node
56
OpenAI (training)
2
Resources
vncdotool — pip install vncdotool · libregistry