wiki:GettingStarted

Getting Started with Zephyr using BarnOwl on Athena

For general information about Zephyr at MIT, see the SIPB documentation.

Using BarnOwl

To start barnowl, run the command athrun barnowl at the prompt on any Athena machine or athena.diaulup.

The simplest use of Zephyr is to send personal zephyrs to other users. To send a zephyr, type : to bring up a command line, and run the command zwrite USERNAME. You can also start a zwrite command by simply typing z.

You can then enter your message, and then enter a . on a line by itself to finish the zephyr. By convention, zephyrs are usually word-wrapped to 70-character lines or so; Pressing M-q (Alt-q) will word-wrap the text you've entered for you.

Once you've sent and received zephyrs, you can navigate the message list with the arrow keys. Press d to mark a message as deleted, u to undelete it, and x to expunge all messages that have been marked as deleted.

Instead of entering a zwrite command manually, you can also select a message in the message list with the arrow keys, and reply to it using r, which will automatically set up an appropriate zwrite command.

For more documentation on the built-in commands and keybindings, you can press h to bring up barnowl's built-in help screen. For help with a specific command, bring up a command line with : and then type help COMMAND.

To quit, type :quit.

Classes and Instances

Most interesting discussion on Zephyr, however, happens on so-called Zephyr classes. A class is a bit like a chat room in other IM systems. Anyone can send a zephyr to a class, and anyone who is subscribed to that class will receive it. There is no security on classes -- anyone who knows the name of a class can subscribe, and there is no way to determine who is subscribed to a given class.

To subscribe to a class, use the subscribe command:

:subscribe CLASSNAME * *

To send a zephyr to a class, use the zwrite command with the -c option:

:zwrite -c CLASSNAME

Zephyrs to classes usually have an instance attached. An instance is a short “topic” or “subject” that indicates the context of a zephyr. Different instances are often used to multiplex multiple conversations on a high-traffic class. You can specify an instance with the -i option to zwrite:

:zwrite -c CLASSNAME -i INSTANCE

A message without an instance specified will default to the instance “personal”.

Startup

There might be some options that you want to be consistent from session to session; you don't want to have to set the same variables each time. You can fix this by adding the commands to your "startup" file, for example, .owl/startup. This can be done from within BarnOwl, by using the startup command:

:startup set foo bar

Where foo is the variable you want to set, and bar is the value. You do not necessarily have to use the set command, either, any command you can type in BarnOwl can be added to the startup file.

Logging

It is handy to be able to log your conversations so you can refer back to them later. To log classes, for example:

:set classlogging on

And to log personals:

:set logging on

This will log to the "zlog" directory in your locker. You probably don't want people to see what classes you're on or what people you talk to, so you can run the Athena commands

mkdir -p ~/zlog fs sa ~/zlog system:anyuser none mkdir -p ~/zlog/people mkdir -p ~/zlog/class

to create the necessary directories and make them completely hidden.

Note that if you want the logging option to still be set after you quit and relaunch BarnOwl, you will need to prefix the "set" command with "startup". This is how you would write that:

:startup set classlogging on :startup set logging on

See the "Startup" section above for more information.

Persistence

BarnOwl can also be run in a screen session to continue receiving messages while offline.

It can be very annoying to have to close BarnOwl when you turn off your computer. During the time your computer is off, you're missing many (possibly important) zephyrs. It can be aggravating to be using zephyr via an unreliable network connection. It can also be frustrating if you leave your computer on with Zephyr up, but go to a different computer and want to check your zephyrs - how do you do this? These problems can be solved with the magic of screen.

A more detailed and extensive explanation of this can be found at 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.

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.

Screen

You should find a computer or server on which to run your screen session(s) that is up all the time, for example, linux.mit.edu. Screen allows you to run programs inside of it on one computer, and to access those same programs from other computers via ssh.

Quickstart

  1. Pick a machine to host your screen session on.

If you don't know of any options, linux.mit.edu (Linerva) is a good choice.

  1. ssh to that machine.
  2. Run "add kchen". You may want to add this to your ~/.environment file.
  3. Run "owl-screen"

Your screen session is now ready. Once you start the screen session, you'll need to get renewable Kerberos tickets in order to run it for any extended period of time. Press C-a C-c to open a new screen window, and run

kinit -l7d -54

(length 7 days, both Kerberos 5 and Kerberos 4). Press C-a 0 to return back to your BarnOwl window.

When you're ready to log out, press C-a d to "detach" your screen, and then type exit or logout to log out. Later, when you want to "reattach" your screen, ssh to the machine again, and run screen -r.

Kerberos Tickets and AFS Tokens

In order to keep your screen session authenticated, you'll need to keep your Kerberos tickets and AFS tokens up-to-date. There is a script that will do this for you, located in the kchen locker. After you ssh into the machine that hosts your screen sessions, run the following commands:

add kchen owl-screen C-a C-c kinit -l1d -r7d

Attaching and Detaching Sessions

To detach a screen session (for example, if you want to log out), press C-a d (Control-A, then D). Screen continues to run, but is no longer active.

To reattach a screen session, possibly detaching from wherever it's currently attached, run:

screen -dr

screen can do a whole lot more. To find out about it, see [UsingScreen](https://sipb-www.scripts.mit.edu:444/doc/wiki/UsingScreen).

Questions

If you have questions, you can send them via email to sipb@mit.edu, or via Zephyr to -c sipb (with an appropriate instance).

Last modified 4 months ago Last modified on May 21, 2014, 8:34:31 PM