-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
64 lines (44 loc) · 2.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
This is a pair of scripts which facilitate VNC desktop sharing using
x11vnc via an ssh tunnel, allowing sharing through firewalls.
So far this is only an experiment - and tested on Linux only.
Suppose the user wishing to share her desktop is called Alice. Bob
wants to view Alice's desktop. Alice and Bob both have accounts on a
server they can connect to via ssh ([email protected] and
[email protected]). Both local and remote port forwarding is enabled
on that server.
That server must also have a index directory created, say
/etc/vnc-gateway, and populated with files named for each user who may
want to share their desktop. Each file should contain a unique port
number for a user for connections to their desktop.
e.g. on gateway.host:
gateway.host$ mkdir /etc/vnc-gateway
gateway.host$ echo 5910 > /etc/vncgateway/alice
gateway.host$ echo 5911 > /etc/vncgateway/charlie # etc.
Alice must have x11vnc installed. Bob must have vncviewer installed.
Both put the showdesktop and viewdesktop scripts somewhere they can
execute them. This example assumes they're in their shell paths.
Alice creates a ~/vnc-gateway file on her desktop machine like this:
GATEWAY_LOGIN=alice
GATEWAY_HOST=gateway.host
GATEWAY_PORT_DIR=/etc/vnc-gateway
X11VNC_OPTS='-viewonly -shared' # grant no control; allow many visitors
Bob creates a similar one on his:
GATEWAY_LOGIN=bob
GATEWAY_HOST=gateway.host
GATEWAY_PORT_DIR=/etc/vnc-gateway
X11VNC_OPTS='-viewonly -shared' # grant no control; allow many visitors
Alice then runs showdesktop:
alice$ showdesktop
She will be prompted for her password twice, unless she has set up ssh
shared key authentication. x11vnc will run.
Bob can then connect to Alice's desktop like this:
bob$ viewdesktop alice
If Charlie sets up a ~/.vnc-gateway too, and runs showdesktop, bob can
view his desktop like this:
bob$ viewdesktop charlie
Charlie can also view Alice's desktop (simultaneously with Bob, since
Alice defined the flag -shared in X11VNC_OPTS):
charlie$ viewdesktop alice
Howver because Alice also defined the -viewonly flag, neither Charlie
or Bob can only watch what Alice does, and not do anything on her
desktop themselves.