File: remote.txt

package info (click to toggle)
emacspeak 7.0-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,980 kB
  • ctags: 1,977
  • sloc: lisp: 19,030; perl: 548; makefile: 525; sh: 419
file content (160 lines) | stat: -rw-r--r-- 5,451 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
*Running Speech Server  remotely

** Using RSH 

  Appended below is a simple shell script that is available
as file remote-tcl in the emacspeak directory.

 When you launch a terminal and log in to another machine,

a) Make sure the other machine can rsh to your desktop machine.
(you may have to create a .rhosts appropriately depending on your network
configuration)

b) For now edit script remote-tcl and replace labrador by the name of your
desktop machine. (eventually we'll get this from the environment)
Also, make sure the pathname to tcl is correct for your environment.


c) set the environment variable DTK_TCL to the complete pathname of the script
remote-tcl.

d) Make sure remote-tcl is executable --for safety just run it by hand first.

e) If all goes well, launch emacs with emacspeak loaded on the remote machine,
and turn off speech locally on the local emacspeak sesion in the terminal
buffer by pressing C-e d q.

Now, the remote emacspeak session will talk as if it were running locally.
Note: when you switch buffers in the local emacspeak you'll get speech back
since we only turned it off in the local eterm buffer.

All of this works, but you'll have to think "local" and "remote" carefully.

Also, remember that you will have to send C-e C-e twice for the remote
emacspeak to see it once.
For convenience, use command
emacspeak-keymap-choose-new-emacspeak-prefix
in the remote session and pick an alternative prefix --I
typically use C-r


Now for the script--

#!/bin/sh
#$Id: remote.txt,v 7.0 1997/11/13 15:32:30 raman Exp $
#Description: Launch a speech server on  a remote host.
remote=labrador
tcl=/usr/local/bin/tcl

rsh $remote $tcl $1

** Using TCP/IP Sockets 

Many network setups will not allow you to RSH from one host
to another  --this is especially true when using DHCP.
If you are in a situation where you cannot have the remote
machine fork an RSH to your local desktop,
but are able to telnet from the remote host to your local host
here is how you can still run remote Emacspeak sessions to
get local speech feedback.

A second advantage with this approach is that you also get auditory
 icons on the local auditory display.

*** What To Do --Quick Instructions:

I'll assume that you are running Emacspeak both locally and
remotely.
If you only run Emacspeak on the remote machine, see 1B below.

1A) In your local Emacspeak, press C-e M-s 
to start the local speech server --this is the server the
remote side will connect to.

1B If you are not running Emacspeak on the local machine,
you still need to first launch the speech server for the
remote side to connect to.

On the local machine:
From the UNIX shell, change to the Emacspeak installation
directory and execute 

tcl speech-server  2222 dtk-exp

The above starts the speech server for the Dectalk Express
listening on port 2222.
(Note that step 1A does exactly this --except that Emacs
prompts you for the appropriate values)

2) Login to the remote machine.

2A If you have remote logged-in 
 from inside an eterm in your local Emacspeak,
you will be getting spoken feedback from this eterm.
In the remote Emacspeak, execute command
emacspeak-remote-connect-to-server
and supply the name of your local host  and port (port is
 2222 in this example).
This will result in the remote Emacspeak connecting to your
 local speech server.

Now you can turn off the speech in the eterm buffer from
your local Emacspeak by pressing C-e d q --
and you should be setfor using your remote emacspeak with
local speech output.

Note that when you use command
emacspeak-remote-connect-to-server
the emacspeak-prefix on the remote end gets set to C-r
automatically.
You can still use C-e as the emacspeak-prefix (you may want
to if you are not running a local Emacspeak session).

3) Closing down

When you are done using the remote emacspeak session
e.g. you are about to hang up the phone line,
you should first shut down the speech server. Note: you do
not need to exit the remote emacspeak--
I run Emacspeak inside screen and leave it running all the
time--

To close down the remote speech server cleanly:

A) Restart the speech server on the remote end by pressing
C-r C-s --this will close down the connection
to the speech server --and the remote emacspeak will stop talking on
your local machine.

b) Turn on speech in the eterm with C-e dq --now you hear
your eterm talking again.
c) Do whatever you do to detach your screen, logout etc.

** Caveats:

Note that there are some problems you may run into when running
simultaneous local and remote sessions of Emacspeak.

Here is a summary:

*** Dropped acknowledgements:

The most common problem is that sometimes the remote end will fail to
get an acknowledgement it is waiting for --this typically happens when
the remote end first opens the connection to the speech server.
If this happens, you will find that the remote emacspeak does not
speak. The solution is to:

a) Power cycle the Dectalk --this results in the Dectalk sending out
some initial power-up codes that gets the remote speech-server
unwedged.

b) An alternative solution is to switch to another buffer in the local
Emacspeak and restart its speech server --you do this as usual
i.e. C-e C-s

Note that the above problems typically result when both local and
remote sessions have sent requests to their respective speech servers,
and one speech server ends up swallowing an acknowledgement that the
other server is waiting for.