]> sipb.mit.edu Git - wiki.git/blob - doc/zephyr.mdwn
(no commit message)
[wiki.git] / doc / zephyr.mdwn
1 [[!meta title="Using Zephyr (a.k.a. Zephyr For Dummies)"]]
2
3 <!-- For information on the archaic way of using Zephyr, see TraditionalZephyr.-->
4
5 ## Introduction to Zephyr
6
7 Zephyr was a system designed to let system administrators send
8 important messages to users in an easily noticeable format. It was
9 meant to have a low volume of traffic and be used only for official
10 notices. This is obviously not what Zephyr is today. It can still be
11 used in the way it was intended: notice that you get official
12 zephyrgrams as you log in, with important information about Athena
13 services and planned outages. However, the most common usage is by
14 average users exchanging information about classes, how their days are
15 going, and talking on Zephyr classes and instances about everything
16 from the latest episode of Battlestar Galactica to the next 18.03
17 problem set. The usage of Zephyr has far exceeded original
18 expectations. Over time, people have also created programs that give
19 Zephyr a graphical interface, and programs that give zephyr a purely
20 textual interface, that can be used entirely within a ssh
21 terminal. Some of these zephyr clients have become so widely used that
22 there are users who do not know that there are other ways to send (and
23 receive) zephyrgrams. This wiki will cover the traditional commands,
24 typed at the athena% prompt, as well as the more common modern zephyr
25 client BarnOwl.
26
27 The information in this wiki about BarnOwl just barely touches the
28 surface.  More for in-depth functionality, visit the [BarnOwl
29 wiki](https://barnowl.mit.edu/).
30
31 ## Modern Zephyr
32
33 Today the majority of Zephyr users use the barnowl client.  There are
34 other clients as well (for example, Pidgin supports Zephyr).  The
35 following sections will go into detail about how to install, use, and
36 customize barnowl.
37
38 ### Other Clients
39
40 There are other clients besides BarnOwl, however their use is not
41 nearly as widespread.  Some of these include:
42
43 * Owl (unmaintained, BarnOwl evolved from this)
44 * vt / jervt
45 * zwgc (see TraditionalZephyr)
46 * Pidgin
47 * zephyr-mode for emacs
48 * [ZephyrPlus web client](https://zephyrplus.mit.edu)
49
50 Using BarnOwl is recommended, as it is better supported and more
51 documentation exists for it.
52
53 ### Using BarnOwl
54 You will need access to an Athena machine to run barnowl.  The easiest
55 way to do this would be to SSH into linux.mit.edu.
56
57 On a Debian-based linux distro, open up a terminal and type `ssh
58 <username>@linux.mit.edu`.
59
60 On Windows, download a SSH client (such as
61 [PuTTY](http://chiark.greenend.org.uk/~sgtatham/putty/download.html); you will need to [change PuTTY’s character set](http://utf-8.scripts.mit.edu/wiki/PuTTY) to UTF-8 to prevent occasional display glitches.)
62 and install it.  Once you've opened it, type `<username>@linux.mit.edu`
63 into the prompt and hit enter.
64
65 On a Mac, open Terminal from the Utilities Folder in Applications. Type
66 `kinit <username>@ATHENA.MIT.EDU && ssh -K
67 <username>@linux.mit.edu` If this command fails (saying -K is
68 invalid), then just do `ssh <username>@linux.mit.edu`.
69
70 Alternatively, use a Java applet called Mindterm SSH inside any web browser. MIT makes this available at [athena.dialup.mit.edu](http://athena.dialup.mit.edu/ssh.html); although this will give you an Athena terminal, you may want to ssh from there to linux.mit.edu so as to follow the rest of these instructions exactly:
71
72         athena.dialup.mit.edu login: <username>
73         <username>@athena.dialup.mit.edu's password: <password>
74         (wait a while)
75         <username>@<some-server>:~$ ssh <username>@linux.mit.edu
76         <username>@<other-server>:~$
77         
78 (In all these cases, don't include the angle brackets, just replace
79 <username> with your MIT username).  You will then be prompted for your
80 password.  Enter it, and then carry on with running barnowl!
81
82 To start barnowl, run the command `add barnowl; barnowl` at the prompt
83 on any Athena machine or dialup, such as linux.mit.edu.
84
85 The simplest use of Zephyr is to send personal zephyrs to other
86 users. To send a zephyr, type `:` to bring up a command line, and run
87 the command `zwrite USERNAME`. You can also start a `zwrite` command
88 by simply typing z.
89
90 You can then enter your message, and then enter a `.` on a line by
91 itself to finish the zephyr. By convention, zephyrs are usually
92 word-wrapped to 70 characters or so per line; barnowl will wrap at about
93 10 characters less than the width of your terminal window, so if you
94 have a large window, you may need to press M-q (Alt-q, or Escape then q)
95 to word-wrap the current paragraph to a smaller width.
96
97 Once you've sent and received zephyrs, you can navigate the message
98 list with the arrow keys. Press `d` to mark a message as deleted, `u`
99 to undelete it, and `x` to expunge all messages that have been marked
100 as deleted.
101
102 Instead of entering a `zwrite` command manually, you can also select a
103 message in the message list with the arrow keys, and reply to it using
104 `r`, which will automatically set up an appropriate `zwrite` command.
105
106 For more documentation on the built-in commands and keybindings, you
107 can press h to bring up barnowl's built-in help screen. For help with
108 a specific command, bring up a command line with `:` and then type
109 `help COMMAND`.
110
111 ### Classes and Instances
112
113 Generally the most interesting discussion on Zephyr, however, happens
114 on so-called Zephyr <em>classes</em>. A class is a bit like a chat
115 room in other IM systems. Anyone can send a zephyr to a class, and
116 anyone who is subscribed to that class will receive it. There is no
117 security on classes -- anyone who knows the name of a class can
118 subscribe, and there is no way to determine who is subscribed to a
119 given class.
120
121 To subscribe to a class, use the subscribe command:
122
123     :subscribe CLASSNAME * * 
124
125 To send a zephyr to a class, use the zwrite command with the -c option:
126
127     :zwrite -c CLASSNAME
128
129 Zephyrs to classes usually have an instance attached. An instance is a
130 short &ldquo;topic&rdquo; or &ldquo;subject&rdquo; that indicates the
131 context of a zephyr.  Different instances are often used to multiplex
132 multiple conversations on a high-traffic class. You can specify an
133 instance with the -i option to zwrite:
134
135     :zwrite -c CLASSNAME -i INSTANCE
136
137 A message without an instance specified will default to the instance
138 &ldquo;personal&rdquo;.
139
140 Some common classes include:
141
142 <strong>help</strong>:
143 > -c help is a class for asking (and answering) questions on virtually
144 > any topic imaginable. Be sure to use an instance (such as
145 > &ldquo;linux&rdquo;, &ldquo;barnowl&rdquo;, &ldquo;campus&rdquo;, or
146 > so on) when asking questions, since it's a fairly high-traffic
147 > class.
148
149 <strong>sipb</strong>:
150 > -c sipb is where most SIPB members hang out. It's a place for
151 > technical discussion, questions, support, and organizing SIPB events
152 > or projects. You should also always use an instance when sending to
153 > -c sipb.
154
155 <strong>Personal Classes</strong>:
156 > By convention, nearly every Zephyr user has a "personal" class that
157 > is the same as their username. How this class is used varies from
158 > person to person, but it's often a sort of mini-blog, a place to
159 > report what one is working on or up to, or ask friends questions, or
160 > just rant about something.
161
162 ### Zephyr Slang
163
164 If you spend enough time on Zephyr, you'll begin noticing some strange
165 phrases and words being thrown around.  Some of these include:
166
167 <strong>i,i foo</strong>:
168 > picked up from CMU zephyrland and means "I have no point here, I
169 > just like saying:".  Sometimes people simply use quotes: `"foo"`.
170
171 <strong>mix</strong>:
172 > If somebody accidentally sends a Zephyr to the wrong class or
173 > person, they will send another Zephyr to that wrong/class person
174 > simply saying "mix".  This basically just means, "oops, sorry, I
175 > didn't mean to send that Zephyr here".  You might also see "-i mix",
176 > which is the same thing, only with instances.
177
178 <strong>.d</strong>:
179 > You may see an instance change from `-i foo` to `-i foo.d`.  This
180 > indicates a deviation or tangent from the the original topic.
181
182 <strong>starking</strong>:
183 > Answering a question or replying to a topic to a topic several hours
184 > (or days, occasionally) later. The term originates from Greg Stark,
185 > who would often reply to zephyrs hours or occasionally days later
186 > without seeing if anyone had answered yet, or worse, if the instance
187 > had moved on to an entirely different topic.
188
189 <strong>ttants</strong>:
190 >  Literally, "Things That Are Not The Same".
191
192 <strong>prnf</strong>:
193 >  Literally, "Pseudo-Random Neuron Firings".
194
195 There are many other acronyms that are used; if you don't know what it
196 means, try using the `whats foo` command at an Athena terminal. If you
197 don't have the command, run `add sipb` first.
198
199 ### Zephyr Etiquette
200
201 There are rules that people tend to use on Zephyr.  These include:
202
203 Good grammar, spelling, and punctuation.  Not everybody uses
204 capitalization, but they will still use good English.  Please do not say
205 things such as "hey wut r u up to???".  It makes you look like an idiot.
206 Really.
207
208 You don't need multiple question marks or exclamation points.  Usually.
209
210 There are a few abbreviations people use, such as YMMV (Your Mileage May
211 Vary) or IIRC (If I Remember Correctly), as well as some nerdier ones
212 like DTRT (Do The Right Thing, in reference to
213 [ The Rise of "Worse Is
214 Better"](http://www.jwz.org/doc/worse-is-better.html)).  Try running `add sipb; whats dtrt` to look up an
215 abbreviation.  Common abbreviations that you might find on AIM, however,
216 are not often used.  People tend to look down upon "lol", "rofl", and
217 such.
218
219 Personal classes are by convention considered a little more private than
220 non-personal (public) classes. Although most people don't mind people
221 they've met subscribing to their personal class and lurking, it's poor
222 form to talk loudly on the personal class of someone you don't know.
223
224 ### Startup
225
226 There might be some options that you want to be consistent from
227 session to session; you don't want to have to set the same variables
228 each time.  You can fix this by adding the commands to your "startup"
229 file, for example, `.owl/startup`.  This can be done from within
230 BarnOwl, by using the `startup` command:
231
232     :startup set foo bar
233
234 Where `foo` is the variable you want to set, and `bar` is the value.
235 You do not necessarily have to use the `set` command, either, any
236 command you can type in BarnOwl can be added to the startup file.
237
238 ### Logging
239
240 It is handy to be able to log your conversations so you can refer back
241 to them later.  To log classes, for example:
242
243     :set classlogging on
244
245 And to log personals:
246
247     :set logging on
248
249 This will log to the "zlog" directory in your locker. You probably
250 don't want people to see what classes you're on or what people you
251 talk to, so you can run the Athena commands
252
253     mkdir -p ~/zlog
254     fs sa ~/zlog system:anyuser none
255     mkdir -p ~/zlog/people
256     mkdir -p ~/zlog/class
257
258 to create the necessary directories and make them completely hidden.
259
260 Note that if you want the logging option to still be set after you
261 quit and relaunch BarnOwl, you will need to prefix the "set" command
262 with "startup". This is how you would write that:
263
264     :startup set classlogging on
265     :startup set logging on
266
267 See the "Startup" section above for more information.
268
269 ### Colors
270
271 By default, there are seven colors you may use in the terminal: red,
272 green, yellow, blue, magenta, cyan, and white.  In order to use color
273 in Zephyr, you can use the following notation: `@(@color(red)This is
274 some red text)`
275
276 Colors may vary from machine to machine, as different terminal
277 profiles may have different shades of the seven colors.
278
279 ### Filters
280
281 Some people like to customize their BarnOwl by color-coding classes.
282 This makes it easier to tell different classes apart (and minimize
283 mixing).  BarnOwl has some already existing filters, for example,
284 `personal` (for incoming personals), `out` (for outgoing personals),
285 and `ping` (for pings).  To assign a color to a filter, add the
286 following to your startup file:
287
288     filter personal -c green
289
290 What if you want to color-code your class, or a friends class?  You
291 can create and color filters with:
292
293     filter johndoe class ^johndoe$
294     filter johndoe -c blue
295
296 You can update your settings and filters without restarting your
297 BarnOwl session by:
298
299     :source ~/path/to/config/file
300
301 You can see all the filters by using `:show filters`, and narrow to a
302 particular filter with, e.g., `:view personal`. You can use `:view
303 all` or the keyboard shortcut `V` to see all messages again.
304
305 For more detailed information on filters, visit
306 [https://barnowl.scripts.mit.edu:444/wiki/Filters](https://barnowl.scripts.mit.edu:444/wiki/Filters).
307
308 ## <a id="screen">Running BarnOwl in Screen</a>
309
310 It can be very annoying to have to close BarnOwl when you turn off
311 your computer.  During the time your computer is off, you're missing
312 many (possibly important) zephyrs.  It can be aggravating to be using
313 zephyr via an unreliable network connection.  It can also be
314 frustrating if you leave your computer on with Zephyr up, but go to a
315 different computer and want to check your zephyrs - how do you do
316 this?  These problems can be solved with the magic of screen.
317
318 A more detailed and extensive explanation of this can be found at
319 [http://web.mit.edu/kchen/arch/common/bin/owl-screen.txt](http://web.mit.edu/kchen/arch/common/bin/owl-screen.txt). Basic commands are [Ctrl-a] followed by [c] to open a new window (like a tab), [Ctrl-a][w] to see a list of open windows, and [Ctrl-a] followed by a number to go to that window.
320
321 Do note that running `owl-screen` as apposed to just runnning `screen` and then a barnowl instance provides niceties such as reminders to renew your tickets (the process `/mit/kchen/arch/i386_rhel4/bin/cont-renew-notify`). Also, BarnOwl will always be located on the `0` tab of an `owl-screen` instance, so [Ctrl-a][0] will always take you back to BarnOwl.
322
323 ### Screen
324
325 You should find a computer or server on which to run your screen
326 session(s) that is up all the time, for example, linux.mit.edu.
327 Screen allows you to run programs inside of it on one computer, and to
328 access those same programs from other computers via ssh.
329
330 ### Quickstart
331
332 1.  Pick a machine to host your screen session on.
333     If you don't know of any options, linux.mit.edu (Linerva) is a good choice.
334 2.  ssh to that machine.
335 3.  Run "add kchen".  You may want to add this to your `~/.environment` file.
336 4.  Run "owl-screen"
337
338 Your screen session is now ready.  Once you start the screen session,
339 you'll need to get renewable Kerberos tickets in order to run it for
340 any extended period of time.  Press C-a C-c to open a new screen
341 window, and run
342
343     kinit -l7d -54
344
345 (length 7 days, both Kerberos 5 and Kerberos 4). Press C-a 0 to return
346 back to your BarnOwl window.
347
348 When you're ready to log out, press C-a d to "detach" your screen, and
349 then type `exit` or `logout` to log out.  Later, when you want to
350 "reattach" your screen, ssh to the machine again, and run `screen -r`.
351
352 ### Kerberos Tickets and AFS Tokens
353
354 In order to keep your screen session authenticated, you'll need to
355 keep your Kerberos tickets and AFS tokens up-to-date.  There is a
356 script that will do this for you, located in the `kchen` locker.
357 After you ssh into the machine that hosts your screen sessions, run
358 the following commands:
359
360     add kchen
361     owl-screen
362     C-a C-c
363     kinit -l1d -r7d
364
365 ### Attaching and Detaching Sessions
366
367 To detach a screen session (for example, if you want to log out),
368 press C-a d (Control-A, then D).  Screen continues to run, but is no
369 longer active.
370
371 To reattach a screen session, possibly detaching from wherever it's
372 currently attached, run:
373
374     screen -dr
375
376 `screen` can do a whole lot more.  To find out about it, see
377 [UsingScreen](https://sipb-www.scripts.mit.edu:444/doc/wiki/UsingScreen).
378
379 ### Interaction with Traditional Zephyr
380
381 The default athena startup scripts launch zwgc on login. If you are
382 subscribed to many classes and use Zephyr as many do today, zwgc's
383 behavior is not very desirable. To disable zwgc startup, add:
384
385     setenv ZEPHYR_CLIENT false
386
387 to your `~/.environment` file if you use `tcsh` or
388
389     ZEPHYR_CLIENT=false
390
391 to your `~/.bash_environment` if you use `bash`. This will cause your
392 shell to launch the `false` executable instead of zwgc which does
393 nothing.