VNC Snapshot

Hosted by Source Forge SourceForge Logo
Quick Links
Mail author:
VNC Snapshot at Sourceforge VNC Snapshot Home Page
Official VNC Home Page Tight VNC Home Page

Features Command-Line Options
Examples Project Summary

About VNC and VNCSnapshot

VNC [www.realvnc.com] (an abbreviation for Virtual Network Computing) is a great client/server software package allowing remote network access to graphical desktops. With VNC, you may allow yourself to access your machine from everywhere provided that your machine is connected to the Internet. VNC is free (released under the GNU General Public License) and it's available on most platforms. The original VNC distribution can be obtained at the Real VNC site.

VNC Snapshot is a command-line program for VNC. It will save a JPEG image of the VNC server's screen.

Also included with the package is vncpasswd, to allow you to create password files if you do not have a Unix or Linux version of VNC available. Note that while this utility is in the Windows version of VNC Snapshot, it does not create a file usable by the Windows version of the VNC Server.

VNC Snapshot is derived from Tight VNC [www.tightvnc.com] and Real VNC [www.realvnc.com].

Sources and binaries can be download from the VNCSnapshot Source Forge site.

VNC Snapshot Features and Usage

VNC Snapshot includes all standard VNC viewer options, except those that apply to the viewer's window.

VNC Snapshot can only be used from the command line.

It can be invoked in three ways:

vncsnapshot options host:display JPEG-filename

vncsnapshot options -listen local-display JPEG-filename

vncsnapshot options -tunnel host:display JPEG-filename

vncsnapshot options -via gateway host:display JPEG-filename

-listen, -tunnel and -via options have not been tested on Windows systems.

Options
-cursor
-nocursor
Attempt to include, or exclude, the mouse cursor from the snapshot. Currently, this works only when the remote server is TightVNC 1.2.7 or later. Other servers do not respond to these options and may or may not include the cursor in the snapshot.
-passwd filename Read encrypted password from filename instead of from the console. The filename can be made with the vncpasswd utility included in the vncsnapshot distribution.
-encodings list Use the given encodings. The default is
 "copyrect tight hextile zlib corre rre"
or
 "raw copyrect tight hextile zlib corre rre"
when VNC snapshot and the server are on the same machine.
-compresslevel level Compress network messages to level, if the server supports it. level is between 0 and 9, with 0 being no compression and 9 the maximum. The default is 4.
-allowblank
-ignoreblank
Allow, or ignore, blank (all black) screens from the server. The default is to ignore blank screens, and to wait for the first non-blank screen instead. This is useful with some versions of RealVNC, which send an all-black screen initially before sending the actual screen image.
-vncQuality quality Use the specified image quality level (0-9) for tight encoding. The default is 9.
-quality quality Use the specified JPEG image quality (0-100) for the output file. The default is 100.
-quiet Do not print any messages. Opposite of -verbose.
-verbose Print messages; default.
-rect wxh+x+y Save a sub-rectangle of the screen, width w height h offset from the left by x and the top by y.

A negative number for x or y makes it an offset from the opposite edge.

A zero value for the width or height makes the snapshot extend to the right or bottom of the screen, respectively.

The default is the entire screen.

-count number Take number snapshots; default 1. If greater than 1, vncsnapshot will insert a five-digit sequence number just before the output file's extension; i.e. if you specify out.jpeg as the output file, it will create out00001.jpeg, out00002.jpeg, and so forth.
-fps rate When taking multiple snapshots, take them every rate seconds; default 60.

Example Command Lines

vncsnapshot ankh-morpork:1 unseen.jpg
Get a snapshot of screen 1 from the server ahnk-morpork and save it in unseen.jpg. The entire screen is saved; the default transport is used.
vncsnapshot -listen 0 portrait.jpeg
Wait for a server to connect to this host (using "screen" 0), and then save the full screen image in portrait.jpeg.
vncsnapshot -passwd ~/.vnc/passwd -rect 640x0+120+30 :1 subarea.jpeg
Using ~/.vnc/passwd to get the server's password, connect to screen 1 on the local machine and save a rectangle 640 pixels high and extending to the right edge offset 120 pixels from the left and 30 pixels down.
vncsnapshot -rect 0x0-800-600 :1 pict.jpeg
Get a snapshot that is 800 pixels from the right edge and 600 pixels from the bottom of the screen. It will extend to the screen edges, making it 800x600. Alternatively, the rectangle could be given as -rect 800x600-0-0, which specifies the same region.

Project Summary

Current Release:
Version: 1.2a
Release Notes: 1.2 Release Notes
Change Log: 1.2a Change Log