Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 71 lines (47 sloc) 1.827 kb
5975ecc @acme Import Net::VNC 0.36
acme authored
1 NAME
2 Net::VNC - A simple VNC client
3
4 SYNOPSIS
5 use Net::VNC;
6
7 my $vnc = Net::VNC->new({hostname => $hostname, password => $password});
8 $vnc->login;
9
10 print $vnc->name . ": " . $vnc->width . ' x ' . $vnc->height . "\n";
11
12 my $image = $vnc->capture;
13 $image->save("out.png");
14
15 DESCRIPTION
16 Virtual Network Computing (VNC) is a desktop sharing system which uses
17 the RFB (Remote FrameBuffer) protocol to remotely control another
18 computer. This module acts as a VNC client and communicates to a VNC
19 server using the RFB protocol, allowing you to capture the screen of the
20 remote computer.
21
22 This module dies upon connection errors (with a timeout of 15 seconds)
23 and protocol errors.
24
25 METHODS
26 new
27 The constructor. Given a hostname and a password returns a Net::VNC
28 object:
29
30 my $vnc = Net::VNC->new({hostname => $hostname, password => $password});
31
32 login
33 Logs into the remote computer:
34
35 $vnc->login;
36
37 name
38 Returns the name of the remote computer:
39
40 print $vnc->name . ": " . $vnc->width . ' x ' . $vnc->height . "\n";
41
42 width
43 Returns the width of the remote screen:
44
45 print $vnc->name . ": " . $vnc->width . ' x ' . $vnc->height . "\n";
46
47 height
48 Returns the height of the remote screen:
49
50 print $vnc->name . ": " . $vnc->width . ' x ' . $vnc->height . "\n";
51
52 capture
53 Captures the screen of the remote computer, returning an Image::Imlib2
54 object:
55
56 my $image = $vnc->capture;
57 $image->save("out.png");
58
59 AUTHOR
60 Leon Brocard acme@astray.com
61
62 Many thanks for Foxtons Ltd for giving me the opportunity to write this
63 module.
64
65 COPYRIGHT
66 Copyright (C) 2006, Leon Brocard
67
68 This module is free software; you can redistribute it or modify it under
69 the same terms as Perl itself.
70
Something went wrong with that request. Please try again.