├── 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 | VNC Snapshot 6 | 7 | 16 | 17 |

VNC Snapshot

18 |
Hosted by Source Forge SourceForge Logo
20 | 21 | 22 | 23 | 24 | 31 | 32 | 34 | 36 | 37 | 38 | 40 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Quick Links
Mail author: 25 | 30 |
33 | VNC Snapshot at Sourceforge 35 | VNC Snapshot Home Page
39 | Official VNC Home Page 41 | Tight VNC Home Page

Features Command-Line Options
Examples Project Summary
55 | 56 | 57 |

About VNC and VNCSnapshot

58 | 59 |

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 Features and Usage

77 | VNC Snapshot includes all standard VNC viewer options, except those that apply 78 | to the viewer's window. 79 | 80 |

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 |

90 | 91 | 92 | 93 | 94 | 99 | 100 | 101 | 102 | 107 | 108 | 109 | 110 | 116 | 117 | 118 | 119 | 122 | 123 | 124 | 126 | 130 | 131 | 132 | 133 | 135 | 136 | 137 | 138 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 159 | 160 | 161 | 162 | 167 | 168 | 169 | 170 | 172 | 173 |
Options
-cursor
-nocursor
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 |
-passwd filename 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 |
-encodings list 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 |
-compresslevel level 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.
-allowblank
125 | -ignoreblank
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.
-vncQuality quality Use the specified image quality level (0-9) for 134 | tight encoding. The default is 9.
-quality quality Use the specified JPEG image quality (0-100) for the output file. 139 | The default is 100.
-quietDo 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 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 |

-count number 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.
-fps rate When taking multiple snapshots, take them every rate seconds; default 60. 171 |
174 |

Example Command Lines

175 |
176 |
177 | vncsnapshot ankh-morpork:1 unseen.jpg 178 |
179 |
Get a snapshot of screen 1 from the server ahnk-morpork 180 | and save it in unseen.jpg. The entire screen is saved; the 181 | default transport is used. 182 |
183 |
184 | vncsnapshot -listen 0 portrait.jpeg 185 |
186 |
Wait for a server to connect to this host (using "screen" 0), 187 | and then save the full screen image in portrait.jpeg. 188 |
189 |
190 | vncsnapshot -passwd ~/.vnc/passwd -rect 640x0+120+30 :1 subarea.jpeg 191 |
192 |
193 | Using ~/.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 |
198 |
199 | vncsnapshot -rect 0x0-800-600 :1 pict.jpeg 200 |
201 | Get a snapshot that is 800 pixels from the right edge and 600 pixels 202 | from the bottom of the screen. It will extend to the screen edges, 203 | making it 800x600. Alternatively, the rectangle could be given 204 | as -rect 800x600-0-0, which specifies the same region. 205 |
206 |
207 |

Project Summary

208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 |
Current Release:
Version: 1.2a
Release Notes: 1.2 Release Notes
Change Log: 1.2a Change Log
225 | 226 | 227 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: main.c 3 | * Author: root 4 | * 5 | * Created on March 23, 2012, 12:53 AM 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | /* 12 | * 13 | */ 14 | int main(int argc, char** argv) { 15 | 16 | return (EXIT_SUCCESS); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /man/vncsnapshot.man1: -------------------------------------------------------------------------------- 1 | .TH "vncsnapshot" "1" "1.0beta2" "Grant McDorman" "VNC" 2 | .\" $Id: vncsnapshot.man1,v 1.6 2004/09/11 15:53:13 grmcdorman Exp $ 3 | .SH "NAME" 4 | .LP 5 | vncsnapshot \- grab snapshots from VNC servers 6 | .SH "SYNTAX" 7 | .LP 8 | vncsnapshot [\fIoptions\fP] \fIhost\fP:\fIdisplay\fP \fIJPEG\-file\fP 9 | .br 10 | vncsnapshot [\fIoptions\fP] \-listen \fIlocal\-display\fP \fIJPEG\-file\fP 11 | .br 12 | vncsnapshot [\fIoptions\fP] \-tunnel \fIhost\fP:\fIdisplay\fP \fIJPEG\-file\fP 13 | .br 14 | vncsnapshot [\fIoptions\fP] \-via \fIgateway\fP \fIhost\fP:\fIdisplay\fP \fIJPEG\-file\fP 15 | .SH "DESCRIPTION" 16 | .LP 17 | VNC Snapshot is a command\-line program for VNC. It will save a JPEG image of the VNC server's screen. 18 | .LP 19 | This manual page documents version 1.2a of vncsnapshot. 20 | .SH "OPTIONS" 21 | .LP 22 | .TP 23 | \fB\-allowblank\fR 24 | Allow blank (all black) images as snapshots. See \fB-ignoreblank\fP. 25 | \fB\-compresslevel\fR \fIlevel\fP 26 | Compress network messages to level, if the server supports it. level is between 0 and 9, with 0 being no compression 27 | and 9 the maximum. The default is 4. 28 | .TP 29 | \fB\-cursor\fR 30 | Include the cursor in snapshots. Only effective if the remote server is a 31 | TightVNC version; otherwise ignored. 32 | .TP 33 | \fB\-encodings\fR \fIlist\fP 34 | Use the given encodings. The default is 35 | .br 36 | \ "copyrect tight hextile zlib corre rre" 37 | .br 38 | or 39 | .br 40 | \ "raw copyrect tight hextile zlib corre rre" 41 | .br 42 | when VNC snapshot and the server are on the same machine. 43 | .TP 44 | \fB\-ignoreblank\fR 45 | Ignore blank (all black) screens; do not save the screen until a screen that 46 | is not all black is received. This is useful with some servers that send an 47 | initial all-black screen before sending the actual screen. This is the 48 | default. 49 | .TP 50 | \fB\-jpeg\fR 51 | Request the remote server to use JPEG-style encoding when sending the image, 52 | if possible. Currently only supported by TightVNC (and servers derived from 53 | it). This is the default. 54 | .TP 55 | \fB\-nocursor\fR 56 | Do not include the cursor in snapshots. Only effective if the remote server is a 57 | TightVNC version; otherwise ignored. This is the default. 58 | .TP 59 | \fB\-nojpeg\fR 60 | Request the remote server to \fBnot\fP use JPEG-style encoding when sending the image, 61 | if possible. Currently only supported by TightVNC (and servers derived from 62 | it). 63 | .TP 64 | \fB\-listen\fR \fIlocal-display\fP 65 | Do not connect to a server; wait for the server to 66 | connect to the specified local "display". Cannot be used with \fB\-tunnel\fP or \fB\-via\fP options. 67 | .TP 68 | \fB\-passwd\fR \fIfilename\fP 69 | Read encrypted password from \fIfilename\fP instead of from the console. The \fIfilename\fP can be made with the 70 | vncpasswd utility included with the vncsnapshot release. 71 | .TP 72 | \fB\-quality \fIquality\fP 73 | Use the specified JPEG image quality (0-100) for the output file. 74 | The default is 100. 75 | .TP 76 | \fB\-quiet 77 | Do not print any messages. Opposite of \fB-verbose\fP. 78 | .TP 79 | \fB\-rect \fIw\fPx\fIh\fP+\fIx\fP+\fIy\fP 80 | Save a sub-rectangle of the screen, width \fIw\fP height \fIh\fP 81 | offset from the left by \fIx\fP and the top by \fIy\fP. 82 | 83 | A negative number for \fIx\fP or \fIy\fP makes it an 84 | offset from the opposite edge. 85 | 86 | A zero value for the width or height makes the snapshot extend 87 | to the right or bottom of the screen, respectively. 88 | 89 | The default is the entire screen. 90 | .TP 91 | \fB\-tunnel\fR 92 | Connect to the remote server via an SSH tunnel. 93 | Cannot be used with \fB\-listen\fP or \fB\-via\fP options. 94 | .TP 95 | \fB\-via\fR \fIgateway\fP 96 | Connect to the remote server via an SSH tunnel on the host 97 | \fIgateway\fP. 98 | Cannot be used with \fB\-listen\fP or \fB\-tunnel\fP options. 99 | .TP 100 | \fB\-verbose 101 | Print messages; default. 102 | .TP 103 | \fB\-vncQuality \fIquality\fP 104 | Use the specified image quality level (0-9) for 105 | tight encoding. The default is 9. Only effective if the remote server is a 106 | TightVNC version; otherwise ignored. 107 | .TP 108 | \fB\-count \fInumber\fP 109 | Take \fInumber\fP snapshots; default 1. If greater than 1, 110 | vncsnapshot will insert a five-digit sequence number just before 111 | the output file's extension; i.e. if you specify \fBout.jpeg\fP 112 | as the output file, it will create \fBout00001.jpeg\fP, \fBout00002.jpeg\fP, 113 | and so forth 114 | .TP 115 | \fB\-fps \fIrate\fP 116 | When taking multiple snapshots, take them every \fIrate\fP seconds; default 60. 117 | .SH "EXAMPLES" 118 | .TP 119 | vncsnapshot ankh-morpork:1 unseen.jpg 120 | Get a snapshot of screen 1 from the server \fBahnk-morpork\fP 121 | and save it in \fBunseen.jpg\fP. The entire screen is saved; the 122 | default transport is used. 123 | .TP 124 | vncsnapshot \-listen 0 portrait.jpeg 125 | Wait for a server to connect to this host (using "screen" 0), 126 | and then save the full screen image in \fBportrait.jpeg\fP. 127 | .TP 128 | vncsnapshot \-passwd ~/.vnc/passwd \-rect 640x0+120+30 :1 subarea.jpeg 129 | Using \fB~/.vnc/passwd\fP to get the server's password, 130 | connect to screen 1 on the local machine and save a rectangle 640 pixels 131 | high and extending to the right edge, offset 120 pixels from the left 132 | and 30 pixels down. 133 | .TP 134 | vncsnapshot \-rect 0x0\-800\-600 :1 pict.jpeg 135 | Get a snapshot that is 800 pixels from the right edge and 600 pixels 136 | from the bottom of the screen. It will extend to the screen edges, 137 | making it 800x600. Alternatively, the rectangle could be given as 138 | \fB-rect 800x600-0-0\fP, which specifies the same region. 139 | .SH "AUTHOR" 140 | .LP 141 | Grant McDorman 142 | .br 143 | Based on TightVNC and RealVNC 144 | . 145 | .SH "DISTRIBUTION" 146 | Source for vncsnapshot can be found at . 147 | .SH "SEE ALSO" 148 | .LP 149 | vncviewer(1), Xvnc(1), vncpasswd(1), vncconnect(1) 150 | -------------------------------------------------------------------------------- /nbproject/Makefile-Debug.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a -pre and a -post target defined where you can add customized code. 6 | # 7 | # This makefile implements configuration specific macros and targets. 8 | 9 | 10 | # Environment 11 | MKDIR=mkdir 12 | CP=cp 13 | GREP=grep 14 | NM=nm 15 | CCADMIN=CCadmin 16 | RANLIB=ranlib 17 | CC=gcc 18 | CCC=g++ 19 | CXX=g++ 20 | FC=gfortran 21 | AS=as 22 | 23 | # Macros 24 | CND_PLATFORM=GNU-Linux-x86 25 | CND_CONF=Debug 26 | CND_DISTDIR=dist 27 | CND_BUILDDIR=build 28 | 29 | # Include project Makefile 30 | include Makefile 31 | 32 | # Object Directory 33 | OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 34 | 35 | # Object Files 36 | OBJECTFILES= \ 37 | ${OBJECTDIR}/main.o 38 | 39 | 40 | # C Compiler Flags 41 | CFLAGS= 42 | 43 | # CC Compiler Flags 44 | CCFLAGS= 45 | CXXFLAGS= 46 | 47 | # Fortran Compiler Flags 48 | FFLAGS= 49 | 50 | # Assembler Flags 51 | ASFLAGS= 52 | 53 | # Link Libraries and Options 54 | LDLIBSOPTIONS= 55 | 56 | # Build Targets 57 | .build-conf: ${BUILD_SUBPROJECTS} 58 | "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 59 | 60 | ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot: ${OBJECTFILES} 61 | ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 62 | ${LINK.c} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot ${OBJECTFILES} ${LDLIBSOPTIONS} 63 | 64 | ${OBJECTDIR}/main.o: main.c 65 | ${MKDIR} -p ${OBJECTDIR} 66 | ${RM} $@.d 67 | $(COMPILE.c) -g -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.c 68 | 69 | # Subprojects 70 | .build-subprojects: 71 | 72 | # Clean Targets 73 | .clean-conf: ${CLEAN_SUBPROJECTS} 74 | ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 75 | ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 76 | 77 | # Subprojects 78 | .clean-subprojects: 79 | 80 | # Enable dependency checking 81 | .dep.inc: .depcheck-impl 82 | 83 | include .dep.inc 84 | -------------------------------------------------------------------------------- /nbproject/Makefile-Release.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a -pre and a -post target defined where you can add customized code. 6 | # 7 | # This makefile implements configuration specific macros and targets. 8 | 9 | 10 | # Environment 11 | MKDIR=mkdir 12 | CP=cp 13 | GREP=grep 14 | NM=nm 15 | CCADMIN=CCadmin 16 | RANLIB=ranlib 17 | CC=gcc 18 | CCC=g++ 19 | CXX=g++ 20 | FC=gfortran 21 | AS=as 22 | 23 | # Macros 24 | CND_PLATFORM=GNU-Linux-x86 25 | CND_CONF=Release 26 | CND_DISTDIR=dist 27 | CND_BUILDDIR=build 28 | 29 | # Include project Makefile 30 | include Makefile 31 | 32 | # Object Directory 33 | OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 34 | 35 | # Object Files 36 | OBJECTFILES= \ 37 | ${OBJECTDIR}/main.o 38 | 39 | 40 | # C Compiler Flags 41 | CFLAGS= 42 | 43 | # CC Compiler Flags 44 | CCFLAGS= 45 | CXXFLAGS= 46 | 47 | # Fortran Compiler Flags 48 | FFLAGS= 49 | 50 | # Assembler Flags 51 | ASFLAGS= 52 | 53 | # Link Libraries and Options 54 | LDLIBSOPTIONS= 55 | 56 | # Build Targets 57 | .build-conf: ${BUILD_SUBPROJECTS} 58 | "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 59 | 60 | ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot: ${OBJECTFILES} 61 | ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 62 | ${LINK.c} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot ${OBJECTFILES} ${LDLIBSOPTIONS} 63 | 64 | ${OBJECTDIR}/main.o: main.c 65 | ${MKDIR} -p ${OBJECTDIR} 66 | ${RM} $@.d 67 | $(COMPILE.c) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.c 68 | 69 | # Subprojects 70 | .build-subprojects: 71 | 72 | # Clean Targets 73 | .clean-conf: ${CLEAN_SUBPROJECTS} 74 | ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 75 | ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 76 | 77 | # Subprojects 78 | .clean-subprojects: 79 | 80 | # Enable dependency checking 81 | .dep.inc: .depcheck-impl 82 | 83 | include .dep.inc 84 | -------------------------------------------------------------------------------- /nbproject/Makefile-impl.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a pre- and a post- target defined where you can add customization code. 6 | # 7 | # This makefile implements macros and targets common to all configurations. 8 | # 9 | # NOCDDL 10 | 11 | 12 | # Building and Cleaning subprojects are done by default, but can be controlled with the SUB 13 | # macro. If SUB=no, subprojects will not be built or cleaned. The following macro 14 | # statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 15 | # and .clean-reqprojects-conf unless SUB has the value 'no' 16 | SUB_no=NO 17 | SUBPROJECTS=${SUB_${SUB}} 18 | BUILD_SUBPROJECTS_=.build-subprojects 19 | BUILD_SUBPROJECTS_NO= 20 | BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 21 | CLEAN_SUBPROJECTS_=.clean-subprojects 22 | CLEAN_SUBPROJECTS_NO= 23 | CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 24 | 25 | 26 | # Project Name 27 | PROJECTNAME=vncsnapshot 28 | 29 | # Active Configuration 30 | DEFAULTCONF=Debug 31 | CONF=${DEFAULTCONF} 32 | 33 | # All Configurations 34 | ALLCONFS=Debug Release 35 | 36 | 37 | # build 38 | .build-impl: .build-pre .validate-impl .depcheck-impl 39 | @#echo "=> Running $@... Configuration=$(CONF)" 40 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 41 | 42 | 43 | # clean 44 | .clean-impl: .clean-pre .validate-impl .depcheck-impl 45 | @#echo "=> Running $@... Configuration=$(CONF)" 46 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 47 | 48 | 49 | # clobber 50 | .clobber-impl: .clobber-pre .depcheck-impl 51 | @#echo "=> Running $@..." 52 | for CONF in ${ALLCONFS}; \ 53 | do \ 54 | "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 55 | done 56 | 57 | # all 58 | .all-impl: .all-pre .depcheck-impl 59 | @#echo "=> Running $@..." 60 | for CONF in ${ALLCONFS}; \ 61 | do \ 62 | "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 63 | done 64 | 65 | # build tests 66 | .build-tests-impl: .build-impl .build-tests-pre 67 | @#echo "=> Running $@... Configuration=$(CONF)" 68 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 69 | 70 | # run tests 71 | .test-impl: .build-tests-impl .test-pre 72 | @#echo "=> Running $@... Configuration=$(CONF)" 73 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 74 | 75 | # dependency checking support 76 | .depcheck-impl: 77 | @echo "# This code depends on make tool being used" >.dep.inc 78 | @if [ -n "${MAKE_VERSION}" ]; then \ 79 | echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ 80 | echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 81 | echo "include \$${DEPFILES}" >>.dep.inc; \ 82 | echo "endif" >>.dep.inc; \ 83 | else \ 84 | echo ".KEEP_STATE:" >>.dep.inc; \ 85 | echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 86 | fi 87 | 88 | # configuration validation 89 | .validate-impl: 90 | @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 91 | then \ 92 | echo ""; \ 93 | echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 94 | echo "See 'make help' for details."; \ 95 | echo "Current directory: " `pwd`; \ 96 | echo ""; \ 97 | fi 98 | @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 99 | then \ 100 | exit 1; \ 101 | fi 102 | 103 | 104 | # help 105 | .help-impl: .help-pre 106 | @echo "This makefile supports the following configurations:" 107 | @echo " ${ALLCONFS}" 108 | @echo "" 109 | @echo "and the following targets:" 110 | @echo " build (default target)" 111 | @echo " clean" 112 | @echo " clobber" 113 | @echo " all" 114 | @echo " help" 115 | @echo "" 116 | @echo "Makefile Usage:" 117 | @echo " make [CONF=] [SUB=no] build" 118 | @echo " make [CONF=] [SUB=no] clean" 119 | @echo " make [SUB=no] clobber" 120 | @echo " make [SUB=no] all" 121 | @echo " make help" 122 | @echo "" 123 | @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 124 | @echo " also build subprojects." 125 | @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 126 | @echo " also clean subprojects." 127 | @echo "Target 'clobber' will remove all built files from all configurations and," 128 | @echo " unless 'SUB=no', also from subprojects." 129 | @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 130 | @echo " also build subprojects." 131 | @echo "Target 'help' prints this message." 132 | @echo "" 133 | 134 | -------------------------------------------------------------------------------- /nbproject/Makefile-variables.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated - do not edit! 3 | # 4 | # NOCDDL 5 | # 6 | CND_BASEDIR=`pwd` 7 | CND_BUILDDIR=build 8 | CND_DISTDIR=dist 9 | # Debug configuration 10 | CND_PLATFORM_Debug=GNU-Linux-x86 11 | CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 12 | CND_ARTIFACT_NAME_Debug=vncsnapshot 13 | CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/vncsnapshot 14 | CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package 15 | CND_PACKAGE_NAME_Debug=vncsnapshot.tar 16 | CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/vncsnapshot.tar 17 | # Release configuration 18 | CND_PLATFORM_Release=GNU-Linux-x86 19 | CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 20 | CND_ARTIFACT_NAME_Release=vncsnapshot 21 | CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/vncsnapshot 22 | CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package 23 | CND_PACKAGE_NAME_Release=vncsnapshot.tar 24 | CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/vncsnapshot.tar 25 | # 26 | # include compiler specific variables 27 | # 28 | # dmake command 29 | ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 30 | (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 31 | # 32 | # gmake command 33 | .PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 34 | # 35 | include nbproject/private/Makefile-variables.mk 36 | -------------------------------------------------------------------------------- /nbproject/Package-Debug.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # 4 | # Generated - do not edit! 5 | # 6 | 7 | # Macros 8 | TOP=`pwd` 9 | CND_PLATFORM=GNU-Linux-x86 10 | CND_CONF=Debug 11 | CND_DISTDIR=dist 12 | CND_BUILDDIR=build 13 | NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 14 | TMPDIRNAME=tmp-packaging 15 | OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 16 | OUTPUT_BASENAME=vncsnapshot 17 | PACKAGE_TOP_DIR=vncsnapshot/ 18 | 19 | # Functions 20 | function checkReturnCode 21 | { 22 | rc=$? 23 | if [ $rc != 0 ] 24 | then 25 | exit $rc 26 | fi 27 | } 28 | function makeDirectory 29 | # $1 directory path 30 | # $2 permission (optional) 31 | { 32 | mkdir -p "$1" 33 | checkReturnCode 34 | if [ "$2" != "" ] 35 | then 36 | chmod $2 "$1" 37 | checkReturnCode 38 | fi 39 | } 40 | function copyFileToTmpDir 41 | # $1 from-file path 42 | # $2 to-file path 43 | # $3 permission 44 | { 45 | cp "$1" "$2" 46 | checkReturnCode 47 | if [ "$3" != "" ] 48 | then 49 | chmod $3 "$2" 50 | checkReturnCode 51 | fi 52 | } 53 | 54 | # Setup 55 | cd "${TOP}" 56 | mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 57 | rm -rf ${NBTMPDIR} 58 | mkdir -p ${NBTMPDIR} 59 | 60 | # Copy files and create directories and links 61 | cd "${TOP}" 62 | makeDirectory "${NBTMPDIR}/vncsnapshot/bin" 63 | copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 64 | 65 | 66 | # Generate tar file 67 | cd "${TOP}" 68 | rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/vncsnapshot.tar 69 | cd ${NBTMPDIR} 70 | tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/vncsnapshot.tar * 71 | checkReturnCode 72 | 73 | # Cleanup 74 | cd "${TOP}" 75 | rm -rf ${NBTMPDIR} 76 | -------------------------------------------------------------------------------- /nbproject/Package-Release.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # 4 | # Generated - do not edit! 5 | # 6 | 7 | # Macros 8 | TOP=`pwd` 9 | CND_PLATFORM=GNU-Linux-x86 10 | CND_CONF=Release 11 | CND_DISTDIR=dist 12 | CND_BUILDDIR=build 13 | NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 14 | TMPDIRNAME=tmp-packaging 15 | OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/vncsnapshot 16 | OUTPUT_BASENAME=vncsnapshot 17 | PACKAGE_TOP_DIR=vncsnapshot/ 18 | 19 | # Functions 20 | function checkReturnCode 21 | { 22 | rc=$? 23 | if [ $rc != 0 ] 24 | then 25 | exit $rc 26 | fi 27 | } 28 | function makeDirectory 29 | # $1 directory path 30 | # $2 permission (optional) 31 | { 32 | mkdir -p "$1" 33 | checkReturnCode 34 | if [ "$2" != "" ] 35 | then 36 | chmod $2 "$1" 37 | checkReturnCode 38 | fi 39 | } 40 | function copyFileToTmpDir 41 | # $1 from-file path 42 | # $2 to-file path 43 | # $3 permission 44 | { 45 | cp "$1" "$2" 46 | checkReturnCode 47 | if [ "$3" != "" ] 48 | then 49 | chmod $3 "$2" 50 | checkReturnCode 51 | fi 52 | } 53 | 54 | # Setup 55 | cd "${TOP}" 56 | mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 57 | rm -rf ${NBTMPDIR} 58 | mkdir -p ${NBTMPDIR} 59 | 60 | # Copy files and create directories and links 61 | cd "${TOP}" 62 | makeDirectory "${NBTMPDIR}/vncsnapshot/bin" 63 | copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 64 | 65 | 66 | # Generate tar file 67 | cd "${TOP}" 68 | rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/vncsnapshot.tar 69 | cd ${NBTMPDIR} 70 | tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/vncsnapshot.tar * 71 | checkReturnCode 72 | 73 | # Cleanup 74 | cd "${TOP}" 75 | rm -rf ${NBTMPDIR} 76 | -------------------------------------------------------------------------------- /nbproject/configurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 15 | main.c 16 | 17 | 21 | 22 | 26 | Makefile 27 | 28 | 29 | Makefile 30 | 31 | 32 | 33 | LOCAL_SOURCES 34 | default 35 | 36 | 37 | 38 | 39 | 40 | 41 | LOCAL_SOURCES 42 | default 43 | 44 | 45 | 46 | 5 47 | 48 | 49 | 5 50 | 51 | 52 | 5 53 | 54 | 55 | 5 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.cnd.makeproject 4 | 5 | 6 | vncsnapshot 7 | c 8 | 9 | 10 | 11 | 12 | 13 | 14 | Debug 15 | 1 16 | 17 | 18 | Release 19 | 1 20 | 21 | 22 | UTF-8 23 | 24 | 25 | 26 | --------------------------------------------------------------------------------