├── BUGS ├── CHANGE-LOG.txt ├── MANIFEST ├── Makefile ├── README ├── README_bin ├── RELEASE-NOTES-1.1.txt ├── RELEASE-NOTES.txt ├── bin ├── vncpasswd └── vncsnapshot ├── html └── vncsnapshot.html ├── main.c ├── man └── vncsnapshot.man1 └── nbproject ├── Makefile-Debug.mk ├── Makefile-Release.mk ├── Makefile-impl.mk ├── Makefile-variables.mk ├── Package-Debug.bash ├── Package-Release.bash ├── configurations.xml └── project.xml /BUGS: -------------------------------------------------------------------------------- 1 | Known bugs in vncsnapshot: 2 | 3 | * The cursor may or may not appear in the snapshot. It is known to not 4 | appear in snapshots of Windows Tight VNC servers when connecting normally, 5 | and to appear when connecting via the server's 'Add New Client' option 6 | (i.e. -listen option for vncsnapshot). In addition, moving the cursor 7 | while vncsnapshot is connecting may result in the cursor being included 8 | in the snapshot. The -cursor and -nocursor attempt to control this, but 9 | are only workable for recent TightVNC servers. 10 | 11 | * When getting multiple snapshots (i.e. using -count with a value greater 12 | than 1) the second and subsequent images are messed up with some VNC 13 | servers. This has been observed with the KDE server ("KDE Desktop 14 | Sharing"), and with Ultra VNC. 15 | 16 | < $Id: BUGS,v 1.5 2004/09/09 22:10:03 grmcdorman Exp $ > 17 | -------------------------------------------------------------------------------- /CHANGE-LOG.txt: -------------------------------------------------------------------------------- 1 | 1.2a 2 | * Fixed bug where the snapshot, by default, would start 60 pixels 3 | down from the top of the screen 4 | * Fixed up Windows zlib.dsp (1.2 release was still 1.1.x zlib.dsp, 5 | despite change log and README entries) 6 | * Minor enhancments to developer make_release_bin and run-sf-compiles 7 | scripts 8 | * Fix to manual page formatting 9 | * Missing change log entry for 1.2 added (-count/-fps options not 10 | mentioned, but are in README) 11 | 1.2 12 | * Upgraded Windows build to Zlib 1.2.1 13 | * Added vncpasswd to the build 14 | * Fixed bug where snapshot thought it had got a non-blank screen when 15 | in fact it hadn't (bug resulted in blank screen captures) 16 | * Fixed to compile on Mac OS X 17 | * Added -count and -fps options for multiple screen shots (does not 18 | work with all servers) 19 | 1.1 20 | * Included UltraVNC RFB definitions in header files. UltraVNC encodings 21 | and scalings are not supported yet, however. 22 | * Merged Tight VNC 1.2.8 and RealVNC 3.3.7 sources 23 | * Merged Tight VNC 1.2.7 sources 24 | * When saving a sub-area of the server's screen, only that part is fetched 25 | (formerly the entire screen was fetched) 26 | * New '-ignoreblank' and '-allowblank' to work around RealVNC servers that 27 | send an initial blank screen. 28 | * Now supports '-cursor' and '-nocursor' options; unfortunately these only 29 | work for recent TightVNC servers 30 | * Merged RealVNC 3.3.6 sources 31 | * Now supports both TightVNC 'tight' and 'zlib' encodings and RealVNC 32 | 'zrle' encoding. 33 | * Dropped beta status as I got no bug reports (in fact, no reports at all) 34 | * -tunnel and -via options now supported for all platforms (not tested on Windows) 35 | * Fix: coordinates of -0 (0 pixels from right/bottom edge) now work 36 | * Win32 Release build works 37 | 1.0 Beta 2 38 | * Added manual page 39 | * Updated zlib dependancy to version without security vunerability 40 | * Updated web page to include author's e-mail 41 | * Updated BUILD.unix and BUILD.win32 to point to official JPEG and zlib sites 42 | -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | Files included in this archive: 2 | 3 | BUGS 4 | CHANGE-LOG.txt 5 | MANIFEST 6 | README 7 | README_bin 8 | RELEASE-NOTES-1.1.txt 9 | RELEASE-NOTES.txt 10 | bin/vncpasswd 11 | bin/vncsnapshot 12 | html/vncsnapshot.html 13 | man/vncsnapshot.man1 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # There exist several targets which are by default empty and which can be 3 | # used for execution of your targets. These targets are usually executed 4 | # before and after some main targets. They are: 5 | # 6 | # .build-pre: called before 'build' target 7 | # .build-post: called after 'build' target 8 | # .clean-pre: called before 'clean' target 9 | # .clean-post: called after 'clean' target 10 | # .clobber-pre: called before 'clobber' target 11 | # .clobber-post: called after 'clobber' target 12 | # .all-pre: called before 'all' target 13 | # .all-post: called after 'all' target 14 | # .help-pre: called before 'help' target 15 | # .help-post: called after 'help' target 16 | # 17 | # Targets beginning with '.' are not intended to be called on their own. 18 | # 19 | # Main targets can be executed directly, and they are: 20 | # 21 | # build build a specific configuration 22 | # clean remove built files from a configuration 23 | # clobber remove all built files 24 | # all build all configurations 25 | # help print help mesage 26 | # 27 | # Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and 28 | # .help-impl are implemented in nbproject/makefile-impl.mk. 29 | # 30 | # Available make variables: 31 | # 32 | # CND_BASEDIR base directory for relative paths 33 | # CND_DISTDIR default top distribution directory (build artifacts) 34 | # CND_BUILDDIR default top build directory (object files, ...) 35 | # CONF name of current configuration 36 | # CND_PLATFORM_${CONF} platform name (current configuration) 37 | # CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) 38 | # CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) 39 | # CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) 40 | # CND_PACKAGE_DIR_${CONF} directory of package (current configuration) 41 | # CND_PACKAGE_NAME_${CONF} name of package (current configuration) 42 | # CND_PACKAGE_PATH_${CONF} path to package (current configuration) 43 | # 44 | # NOCDDL 45 | 46 | 47 | # Environment 48 | MKDIR=mkdir 49 | CP=cp 50 | CCADMIN=CCadmin 51 | 52 | 53 | # build 54 | build: .build-post 55 | 56 | .build-pre: 57 | # Add your pre 'build' code here... 58 | 59 | .build-post: .build-impl 60 | # Add your post 'build' code here... 61 | 62 | 63 | # clean 64 | clean: .clean-post 65 | 66 | .clean-pre: 67 | # Add your pre 'clean' code here... 68 | 69 | .clean-post: .clean-impl 70 | # Add your post 'clean' code here... 71 | 72 | 73 | # clobber 74 | clobber: .clobber-post 75 | 76 | .clobber-pre: 77 | # Add your pre 'clobber' code here... 78 | 79 | .clobber-post: .clobber-impl 80 | # Add your post 'clobber' code here... 81 | 82 | 83 | # all 84 | all: .all-post 85 | 86 | .all-pre: 87 | # Add your pre 'all' code here... 88 | 89 | .all-post: .all-impl 90 | # Add your post 'all' code here... 91 | 92 | 93 | # build tests 94 | build-tests: .build-tests-post 95 | 96 | .build-tests-pre: 97 | # Add your pre 'build-tests' code here... 98 | 99 | .build-tests-post: .build-tests-impl 100 | # Add your post 'build-tests' code here... 101 | 102 | 103 | # run tests 104 | test: .test-post 105 | 106 | .test-pre: 107 | # Add your pre 'test' code here... 108 | 109 | .test-post: .test-impl 110 | # Add your post 'test' code here... 111 | 112 | 113 | # help 114 | help: .help-post 115 | 116 | .help-pre: 117 | # Add your pre 'help' code here... 118 | 119 | .help-post: .help-impl 120 | # Add your post 'help' code here... 121 | 122 | 123 | 124 | # include project implementation makefile 125 | include nbproject/Makefile-impl.mk 126 | 127 | # include project make variables 128 | include nbproject/Makefile-variables.mk 129 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | vncsnapshot 1.2: VNC snapshot utility based on VNC 3 | ================================================================ 4 | 5 | TightVNC is Copyright (C) 2001 Const Kaplinsky. All Rights Reserved. 6 | VNC is Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. 7 | This software is distributed under the GNU General Public Licence as published 8 | by the Free Software Foundation. 9 | 10 | Adapted from the TightVNC viewer by Grant McDorman, February 2002. 11 | 12 | Features 13 | -------- 14 | Always connects to server in 'shared' mode. 15 | 16 | Saves image to JPEG file. The JPEG quality can be specified, with a default 17 | of 100%. 18 | 19 | The remote cursor is NOT included - unfortunately, the server doesn't provide 20 | a way of including the cursor in the snapshot. 21 | 22 | Standard VNC/TightVNC options (encoding, etc.) are available. 23 | 24 | On Windows, -listen, -tunnel and -via options are not available. 25 | 26 | On Windows systems, please read BUILD.win32. 27 | 28 | On Unix and Linux systems, please read BUILD.unix. 29 | 30 | < $Id: README,v 1.4 2004/09/09 00:22:33 grmcdorman Exp $ > 31 | 32 | USE 33 | --- 34 | 35 | $ vncpasswd 36 | Password: 37 | Verify: 38 | 39 | $ ./vncsnapshot -passwd ~/.vnc/passwd -rect 640x0+120+30 192.x.x.x subarea.jpeg 40 | VNC server supports protocol version 3.8 (viewer 3.3) 41 | VNC authentication succeeded 42 | Desktop name "sun:0.0" 43 | Connected to VNC server, using protocol version 3.3 44 | VNC server default format: 45 | 32 bits per pixel. 46 | Least significant byte first in each pixel. 47 | True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 48 | 32 bits per pixel. 49 | Least significant byte first in each pixel. 50 | True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16 51 | can't open subarea.jpeg 52 | 53 | 54 | About VNC and VNCSnapshot 55 | 56 | 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. 57 | 58 | VNC Snapshot is a command-line program for VNC. It will save a JPEG image of the VNC server's screen. 59 | 60 | 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. 61 | 62 | VNC Snapshot is derived from Tight VNC [www.tightvnc.com] and Real VNC [www.realvnc.com]. 63 | 64 | Sources and binaries can be download from the VNCSnapshot Source Forge site. 65 | http://sourceforge.net/projects/vncsnapshot/ 66 | 67 | 68 | VNC Snapshot Features and Usage 69 | 70 | VNC Snapshot includes all standard VNC viewer options, except those that apply to the viewer's window. 71 | VNC Snapshot can only be used from the command line. 72 | 73 | It can be invoked in three ways: 74 | 75 | vncsnapshot options host:display JPEG-filename 76 | 77 | vncsnapshot options -listen local-display JPEG-filename 78 | 79 | vncsnapshot options -tunnel host:display JPEG-filename 80 | 81 | vncsnapshot options -via gateway host:display JPEG-filename 82 | 83 | -listen, -tunnel and -via options have not been tested on Windows systems. 84 | 85 | Options 86 | -cursor 87 | -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. 88 | -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. 89 | -encodings list Use the given encodings. The default is 90 | "copyrect tight hextile zlib corre rre" 91 | or 92 | "raw copyrect tight hextile zlib corre rre" 93 | when VNC snapshot and the server are on the same machine. 94 | -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. 95 | -allowblank 96 | -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. 97 | -vncQuality quality Use the specified image quality level (0-9) for tight encoding. The default is 9. 98 | -quality quality Use the specified JPEG image quality (0-100) for the output file. The default is 100. 99 | -quiet Do not print any messages. Opposite of -verbose. 100 | -verbose Print messages; default. 101 | -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. 102 | A negative number for x or y makes it an offset from the opposite edge. 103 | 104 | A zero value for the width or height makes the snapshot extend to the right or bottom of the screen, respectively. 105 | 106 | The default is the entire screen. 107 | 108 | -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. 109 | -fps rate When taking multiple snapshots, take them every rate seconds; default 60. 110 | 111 | 112 | Example Command Lines 113 | 114 | vncsnapshot ankh-morpork:1 unseen.jpg 115 | 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. 116 | vncsnapshot -listen 0 portrait.jpeg 117 | Wait for a server to connect to this host (using "screen" 0), and then save the full screen image in portrait.jpeg. 118 | vncsnapshot -passwd ~/.vnc/passwd -rect 640x0+120+30 :1 subarea.jpeg 119 | 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. 120 | vncsnapshot -rect 0x0-800-600 :1 pict.jpeg 121 | 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. -------------------------------------------------------------------------------- /README_bin: -------------------------------------------------------------------------------- 1 | In the bin directory is a version of vncsnapshot compiled for Linux Intel 2 | (x86) systems. It is statically linked and should run on any system. 3 | 4 | html directory contains a HTML version (a copy of the vncsnapshot 5 | home page, in fact). 6 | 7 | vncsnapshot's home page is http://vncsnapshot.sourceforge.net. 8 | 9 | -------------------------------------------------------------------------------- /RELEASE-NOTES-1.1.txt: -------------------------------------------------------------------------------- 1 | Release Notes for VNC Snapshot 1.1 2 | ========================================= 3 | 4 | This is the second release of VNC snapshot. It has been tested on Windows, 5 | Linux and Solaris Sparc systems. 6 | 7 | This version merges the TightVNC 1.2.8 and RealVNC 3.3.7 code, including the 8 | ZRLE encoding. 9 | 10 | Semantics of the -rect option has changed. Formerly, when giving negative x 11 | and y (e.g. -rect 400x300-400-300) the x and y coordinates were of the top 12 | left corner of the rectangle. This meant that you usually had to add in the 13 | size of the rectangle. Now, the negative value refers to the right or bottom 14 | edge. Thus, in 1.0b1 the option: 15 | -rect 400x300-400-300 16 | is now 17 | -rect 400x300-0-0 18 | which is more readable (and sensible). This also now corresponds to the way 19 | Unix X11 -geometry specifications work. 20 | 21 | Two new pairs of options are available. 22 | 23 | The first is -cursor and -nocursor, which cause the remote cursor to be 24 | included, or excluded, from the snapshot. They will work with TightVNC 25 | servers only, unfortunately. 26 | 27 | The second is -allowblank and -ignoreblank, which cause blank (all black) 28 | screens to be saved, or ignored. -ignoreblank is the default and is 29 | appropriate for recent RealVNC servers on Windows systems, which send an 30 | all-blank screen at first before sending the actual image. 31 | 32 | Performance improvements have also been made when fetching a sub-rectangle 33 | of the screen; previously the entire screen would be retreived from the 34 | remote server, and the sub-rectangle extracted from that. Now, only the area 35 | to be saved is retrieved. This should reduce the amount of data sent across 36 | the network. 37 | 38 | Note: -listen, -tunnel, and -via are implemented but untested for Windows 39 | systems. 40 | 41 | < $Id: RELEASE-NOTES-1.1.txt,v 1.1 2004/09/09 00:22:33 grmcdorman Exp $ > 42 | -------------------------------------------------------------------------------- /RELEASE-NOTES.txt: -------------------------------------------------------------------------------- 1 | Release Notes for VNC Snapshot 1.2 2 | ========================================= 3 | New in this release is the ability to get multiple snapshots, using the 4 | -count and -fps options. 5 | 6 | This release also includes a version of vncpasswd usable on Windows. 7 | vncpasswd is also built on Unix/Linux systems to allow you to use it without 8 | a full VNC installation. 9 | 10 | Bug fixes include: 11 | * Under some circumstances, a blank screen would be captured even if 12 | -ignoreblank was specified. 13 | * Makefiles have been edited to work better on some non-Linux systems. 14 | * Compilation errors on Mac OS X (Darwin) have been fixed 15 | 16 | A new build script, make_release_bin, for Linux/Unix systems is also provided; 17 | it is intended for use by the maintainer to create compiled versions of the 18 | programs on multiple platforms with minimum pain. 19 | 20 | < $Id: RELEASE-NOTES.txt,v 1.4 2004/09/09 00:22:33 grmcdorman Exp $ > 21 | -------------------------------------------------------------------------------- /bin/vncpasswd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shamun/vncsnapshot/7f33613e3d2cf562738b2b5a2a4db1bec0d30620/bin/vncpasswd -------------------------------------------------------------------------------- /bin/vncsnapshot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shamun/vncsnapshot/7f33613e3d2cf562738b2b5a2a4db1bec0d30620/bin/vncsnapshot -------------------------------------------------------------------------------- /html/vncsnapshot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |Quick Links | 23 |Mail author: 25 | 30 | 31 | |
---|---|
33 | VNC Snapshot at Sourceforge | 34 |35 | VNC Snapshot Home Page | 36 |
39 | Official VNC Home Page | 40 |41 | Tight VNC Home Page | 42 |
|
45 | |
Features | 48 |Command-Line Options | 49 |
Examples | 52 |Project Summary | 53 |
VNC 60 | [www.realvnc.com] (an abbreviation for Virtual Network Computing) is a great client/server software 61 | package allowing remote network access to graphical desktops. With VNC, you may allow 62 | yourself to access your machine from everywhere provided that your machine is 63 | connected to the Internet. VNC is free (released under the GNU General Public License) 64 | and it's available on most platforms. The original VNC distribution can be obtained at the 65 | Real VNC site. 66 | 67 |
VNC Snapshot is a command-line program for VNC. It will save a JPEG image of the VNC server's 68 | screen. 69 |
Also included with the package is vncpasswd, to allow you to create password files if 70 | you do not have a Unix or Linux version of VNC available. Note that while this utility is in the 71 | Windows version of VNC Snapshot, it does not create a file usable by the Windows version 72 | of the VNC Server. 73 |
VNC Snapshot is derived from Tight 74 | VNC [www.tightvnc.com] and Real VNC [www.realvnc.com]. 75 |
Sources and binaries can be download from the VNCSnapshot Source Forge site. 76 |
VNC Snapshot can only be used from the command line. 81 |
It can be invoked in three ways: 82 |
vncsnapshot
options
host:
display
JPEG-filename
83 |
vncsnapshot
options
-listen local-display
JPEG-filename
84 |
vncsnapshot
options
-tunnel host:
display
JPEG-filename
85 |
vncsnapshot
options
-via gateway
host:
display
JPEG-filename
86 |
-listen, -tunnel and -via options have not been 87 | tested on Windows systems. 88 | 89 |
Options | 92 ||
---|---|
-cursor -nocursor |
94 | Attempt to include, or exclude, the mouse cursor from the 95 | snapshot. Currently, this works only when the remote server is TightVNC 96 | 1.2.7 or later. Other servers do not respond to these options and may or may 97 | not include the cursor in the snapshot. 98 | | 99 |
-passwd filename | 102 | Read encrypted password from filename instead
103 | of from the console. The filename can be made with
104 | the vncpasswd utility included in the vncsnapshot
105 | distribution.
106 | |
107 |
-encodings list | 110 | Use the given encodings. The default is
111 | "copyrect tight hextile zlib corre rre" 112 | or 113 | "raw copyrect tight hextile zlib corre rre" 114 | when VNC snapshot and the server are on the same machine. 115 | |
116 |
-compresslevel level | 119 |Compress network messages to level, if the server 120 | supports it. level is between 0 and 9, with 0 being 121 | no compression and 9 the maximum. The default is 4. | 122 |
-allowblank 125 | -ignoreblank |
126 | Allow, or ignore, blank (all black) screens from the server. The 127 | default is to ignore blank screens, and to wait for the first non-blank 128 | screen instead. This is useful with some versions of RealVNC, which send an 129 | all-black screen initially before sending the actual screen image. | 130 |
-vncQuality quality | 133 |Use the specified image quality level (0-9) for 134 | tight encoding. The default is 9. | 135 |
-quality quality | 138 |Use the specified JPEG image quality (0-100) for the output file. 139 | The default is 100. | 140 |
-quiet | 143 |Do not print any messages. Opposite of -verbose. | 144 |
-verbose | 147 |Print messages; default. | 148 |
-rect wxh+x+y | 151 | Save a sub-rectangle of the screen, width w height h
152 | offset from the left by x and the top by y.
153 | A negative number for x or y makes it an 154 | offset from the opposite edge. 155 | A zero value for the width or height makes the snapshot extend 156 | to the right or bottom of the screen, respectively. 157 | The default is the entire screen. 158 | |
159 |
-count number | 162 |Take number snapshots; default 1. If greater than 1, 163 | vncsnapshot will insert a five-digit sequence number just before 164 | the output file's extension; i.e. if you specify out.jpeg 165 | as the output file, it will create out00001.jpeg, out00002.jpeg, 166 | and so forth. | 167 |
-fps rate | 170 |When taking multiple snapshots, take them every rate seconds; default 60. 171 | | 172 |
vncsnapshot ankh-morpork:1 unseen.jpg
178 | ahnk-morpork
180 | and save it in unseen.jpg
. The entire screen is saved; the
181 | default transport is used.
182 | vncsnapshot -listen 0 portrait.jpeg
185 | portrait.jpeg
.
188 | vncsnapshot -passwd ~/.vnc/passwd -rect 640x0+120+30 :1 subarea.jpeg
191 | ~/.vnc/passwd
to get the server's password,
194 | connect to screen 1 on the local machine and save a rectangle 640 pixels
195 | high and extending to the right edge offset 120 pixels from the left
196 | and 30 pixels down.
197 | vncsnapshot -rect 0x0-800-600 :1 pict.jpeg
200 | -rect 800x600-0-0
, which specifies the same region.
205 | Current Release: | 211 ||
---|---|
Version: | 214 |1.2a | 215 |
Release Notes: | 218 |1.2 Release Notes | 219 | 220 | 221 |Change Log: | 222 |1.2a Change Log | 223 | 224 |