Package: vncdotool
vncdotoolvncdotool is a command line VNC client.
It can be useful to automating interactions with virtual machines or
hardware devices that are otherwise difficult to control.It’s under active development and seems to be working, but please report any problems you have.Quick StartTo use vncdotool you will need a VNC server.
Most virtualization products include one, or use RealVNC, TightVNC or clone your Desktop using x11vnc.Once, you have a server running you can install vncdotool from pypi:pip install vncdotooland then send a message to the vncserver with:vncdo -s vncserver type "hello world"Thevncserverargument needs to be in the formataddress[:display|::port]. For example:# connect to 192.168.1.1 on default port 5900
vncdo -s 192.168.1.1 type "hello world"

# connect to localhost on display :3 (port 5903)
vncdo -s localhost:3 type "hello world"

# connect to myvncserver.com on port 5902 (two colons needed)
vncdo -s myvncserver.com::5902 type "hello world"

# connect via IPv6 to localhost on display :3 (port 5903)
vncdo -s '[::1]:3' type "hello IPv6"
#         ^   ^ mind those square brackets around the IPv6 addressYou can also take a screen capture with:vncdo -s vncserver capture screen.pngMore documentation can be found onRead the Docs.FeedbackIf you need help getting VNCDoTool working try the community at_StackoverflowPatches, and ideas for improvements are welcome and appreciated, via_GitHubissues.
If you are reporting a bug or issue please include the version of both vncdotool
and the VNC server you are using it with.AcknowledgementsThanks to Chris Liechti, techtonik and Todd Whiteman for developing the RFB
and DES implementations used by vncdotool.
Also, to theTigerVNCproject for creating a community focus RFB specification document1.2.0 (2023-06-06)fixes for api.shutdown and disconnect raise exceptions, #2561.1.0 (2023-04-01)Huge thanks to @pmhahn for single handedly driving conversion to modern Python3, as well
as cleaning up a ton of outstanding issues.[BREAKING] drop python 2.x support, thanks @pmhahnUse built-in Unittest and mock for testingPEP-484 type hinting, thanks @pmhahnDoc improvements, thanks @luke-jr, @pmhahn, @samiraguiarTest for byte handling, thanks @ponty, refs #177Internal implementation of DES replaced by PyCrotodomeXSupport for Apple Remote Desktop (ARD), thanks @andywgrant, @pmhahnSupport for pseudo-encoding LastRec, thanks @pmhahnSupport for Extended QEMU Key Events, thanks @pmhahnSupport IPv6 addresses for server connection, thanks @pmhahnBugfix, use configured log outputs over stdout, thanks @pevogamBugfix, handle invalid password, thanks @dozysunBugfixes for loggingproxy, thanks @joachimmetz, @pmhahn, @guicho2718281.0.0 (2020-04-10)add ZRLE encoding, thanks Adrian Weilerdrop python2 supportfix mouseDrag behaviour, thanks Samir Aguiar0.13.0 (2019-11-21)new flag –incremental-refreshes, increased compatibility of capture, thanks Amir Rossertexit non-zero and print to stderr for unknown commands, thanks Amir Rossert0.12.1 (2018-12-06)bugfix expectRegion to use cropped images for compare, thanks Michael Fürnschußdirect support for building RPMs, thanks Plamen Dimitrov0.12.0 (2018-04-07)connect via UNIX sockets, thanks Matteo Cafassobugfix, XTightVNC initial connection, thanks Antti Kervinen0.11.2 (2017-09-24)fix version metadata, thanks Kevin Gottsman0.11.1 (2017-07-23)add api.client.disconnect()fix python2.x compatibility, thanks Ostrosablin Vitaly0.11.0 (2017-06-09)enable PSEUDO_DESKTOP_SIZE_ENCODING by default to allow desktop resizing, thanks rebasegodpython 3.0 support, thanks jamtwisteradded pastefile command, thanks Rogan Dawesdebian packaging improvements, thanks Alexander Kläserfix loggingproxy, thanks Matthias Weckbecker0.10.0 (2016-03-03)drop official 2.6 support, it’ll probably work for a while stilluse frombytes rather than fromstring for compatibility with PILvnclog works with password protected servers using –password-requiredexit more reliably after an erroruse increatmental frameBufferUpdateRequests, appears to be compatible with more serversinclude basic version negotiation with servers, thanks Ezra Bühler0.9.0 (2015-05-08)add special keys [~!@#$%^&*()_+{}|:"<>?] to –force-caps, for servers that don’t handle them, Tyler Oderkirk, Aragats Amirkhanyanimprove vnclog performance with TCP_NODELAY, Ian Brittenby default pause 10ms between sending commands, better compatibility with serversbetter handle screen resizing, Daniel Stelter-GlieseAPI, fix deadlocks due to threaded init of PIL, thanks Antti KervinenAPI, support password protected server, thanks Antti KervinenAPI, able to connect to multiple servers, Daniel Stelter-Gliesedrop official support for py2.4 and py2.5use Pillow rather than PILThanks to Jan Sedlák, Daniel Stelter-Gliese, Antti Kervinen, Anatoly Techtonik, Tyler Oderkirk and Aragats Amirkhanyan for helping make this release possible0.8.0 (2013-08-06)improved documentation using sphinxregional capture and expect that operate on a portion of the display–force-caps, better compatibility when sending UPPERCASE to servers–timeout, exit with an error after a given number of secondsexperimental synchronous API for easier integration with non-Twisted apps0.3.0 (2012-12-22)main program renamed to vncdo, vncdotool continues an alias for nowuse host:display, host::port syntax like other vnc tools, removed -dread/play commands from stdin or filevnclog, creates scripts from captured interactive sessionsbetter control over mouse in screen captures with –nocursor
and –localcursormousemove, sleep command aliases to match xdotoolkeyup/keydown commands for more control over keypressessend SetEncodings on connect, thanks Matias Suarez for fixdebian packagingtype “Hello World” now preserves capitalizationbasic compatibility with VNC 4.0 servers, found in some KVMsimproved frameUpdate handling–warp to replay script faster than real-time–delay, insert a delay between sending commands0.2.0 (2012-08-07)add pause, mouseup, mousedown, drag commandsonly require Twisted 11.1.0, so we can have py2.4 supportbugfixes, thanks Christopher Holm for reportingvncdotool type -something now worksno longer silently fail for unsupported image formats0.1.1 (2011-05-18)add PIL to requiresfix bug where incorrect mouse button is sent0.1.0 (2011-03-03)first releasecommands: press, type, move, click, capture, expect