Top page About this site
 
Scotland Formative Years Japan Adolescence Aerial balloon
 
About my projects Balloon pictures Tropical horticulture Animal husbandry Research papers Software
Super Monkey Ball 2 Nerd tips
Admit MSCS Buchanan gay? Square watermelon Strom retrospective My many talents
Window Title ZWrite Notifications

Milton Berle

Zephyr is a pretty neat instant messaging system. Anytime I leave a terminal open, people can zwrite me. I also get new mail alerts. The problem is that when I leave a terminal open, I usually bury the window on my desktop, so I can’t see the messages. The computer beeps when a message or new mail arrives, but the computer beeps for a lot of other reasons, too.
A solution is to have zwrite and new mail notifications appear on the task bar at the bottom of the screen in Windows. On a Mac, having the window title change isn’t quite as easy to see, but it’s still helpful. To do this, we need to do several things:
To do the first two, it’s easiest to put a copy of my .zwgc.desc file in your home directory. The edits require inserting several control characters into the file, and there is no easy way to do this from Unix. To do the second one, create a file called .biffmessage in your home directory containing this single line:
To do the last one (which is most important for user-friendliness, trust me!) open your .cshrc file and look for a line that looks like this:
Put a hash mark (”#”) in front of the first word “set.” This tells the computer that it should ignore the line. Then add this line either above or below it:
Log out and log back in for changes to take effect. To reverse the effect, delete .zwgc.desc and .biffmessage and the line you added to .cshrc, and remove the hash mark you added.
Color VT100
Most modern terminal emulators support color. The original VT100 did not. There are two solutions to getting color under Unix. Either you can tell Unix that you have a spiffy new terminal, or you can tell Unix that a VT100 terminal has color. The first solution is not a solution at all. Unless you only use Linux computers, you’ll get error messages when you log into a Solaris, HP/UX, Irix, MacOS X, etc. machine with your terminal string set to “linux.” Likewise with any other functional string. The strings which behave sanely are not standard.
Surprisingly, what is standard is the binary format of the compiled termcap files! There’s a few extensions that don’t match up so well, but that doesn’t matter too much. Especially if you just use ncurses-based systems and maybe Solaris. You can either decompile, edit, and recompile the VT100 terminfo file to include color with infocmp and tic, or you can just take a sane modern terminal and rename it as VT100. Either way, there are a few small tricks to getting your terminal to work.
You need to put the vt100 file where the software can find it. Unfortunately, there are two standard locations for user-local terminfo files. On my MacOS X machine, the directory is ~/.terminfo/76 and on my Solaris account the directory is ~/.terminfo/v. (”76” is the ASCII code for “v,” which is the first letter of “vt100,” that’s the relation.) That’s all you need to do. When you log into the machine, it will read the terminfo file and give you color! Try Lynx with color. Very nice.
MacOS X Beeps
I have created a set of sine wave beeps for MacOS X with MATLAB. The beeps are at a pitch of 440 Hz, or middle A, so they are pleasant to listen to while easily standing out from background noise. I also made beeps for other common functions at 440 Hz. They stand out but are hard to listen to.
Connecting Powerbooks Directly to PCs
Apple G4 Powerbooks do not require crossover cables to talk directly to another computer; they have an “autosense” feature. Assuming the other computer isn’t running a DHCP service, the Powerbook will automatically assign itself a random address in the 169.254.u.v network using the so-called “ZeroConf” standard. A Windows PC will do the same. Regular Windows PCs behave properly, as far as I know, but Win2k and WinXP machines will not cooperate in the unlikely event that they pick an address that’s already in use. Linux PCs have no intelligence whatsoever without the “zcip” (ZeroConf IP) kernel module installed. Instead, to configure eth0 on Linux, type: “ifconfig eth0 netmask 255.255.0.0 inet 169.254.x.y” where x and y are arbitrary numbers both not equal to u and v. Linux may require that the ifconfig command be typed twice, once without the “netmask 255.255.0.0” option, or it may require the keyword “address” instead of “inet.”
Cleaning Up Excel HTML
Microsoft Excel v.X is pretty good about outputting clean HTML, making it an useful tool for converting ASCII tables into HTML tables. Nevertheless, it does pollute the HTML and it is useful to strip out the garbage. Perl is suitable (and awk and sed are not) because it has a minimal-matching feature. An example of this feature in use, along with the -n (assume loop around -e expression) and -p (print line also) options is:
Zephyr on MacOS X
Running zephyr (sending zwrites, getting Leland “new mail” notifications) is possible with this set of binaries. It is fully operational on my system, with one exception: You cannot see the text of the error messages. I wasn’t able to work around the problem, sorry. It would seem to be avoidable by building every program which depends on com_err at once.
I installed the Mac OS X version of OpenAFS; that may also be required for proper operation of zwgc. To start Zephyr, you first need to start zhm and get Kerberos tickets, in either order. I start zhm with
  • start_zhm
    zhm leland-zephyr.stanford.edu
zhm will not shut down when you close the terminal window. You do not need to worry about again, even after changing network connections. I get Kerberos tickets with kinit. It will not work if you type klog, even though they both ask for your Kerberos password. (I have AFS installed. I used to have some minor issues with zwgc on my Powerbook, but they’ve gone away. I don’t know why they went away. One hypothesis is that installing AFS fixed the problem. AFS modifies your Kerberos installation, because it is based in part on an ancient fork of Kerberos.)
Now you need to start zwgc.
zwgc will exit when you close the relevant terminal window. If everything is configured correctly, you will get a command prompt a second later with no intervening message.
You may have noticed that the Stanford version of zephyr works differently than stock zephyr, requiring command-line-options where stock does not.
Before any of this works, you will need to get Kerberos working on your Powerbook. Copy this Kerberos configuration file to /Library/Preferences. If I’m not mistaken, you will also need to download the Kerberos updates from the MIT Kerberos web page. A test for your MIT Kerberos installation is to run the OS X version of Samson. It will work, even on your non-MacLeland Kerberos installation! You will not be able to get klogin to work, because that requires kftgt, which requires symbols in Kerberos which have been hidden in recent versions. Compiling Kerberos from scratch would allow you to export those symbols, but I have not done this.
A benefit of using MIT Kerberos is that, if you choose to use the graphical login screen (I don’t know if Stanford MacLeland includes a command-line login program), you get a much nicer icon. One significant downside is that the MacLeland program includes a version of Stanford sident. The Stanford version of sident is used to request Kerberos tickets from a machine, and is used by the Stanford web authentication. Normally, it is not necessary because there is an HTTPS substitute, but the substitute does not work for the SUL web proxy. The SUL web proxy allows you to access Stanford-subscribed databases (such as the OED, LexisNexis, and Infotrac) from off-campus. A workaround for the web proxy is to SSH into a Sweet Hall workstation and use Lynx or Netscape.
Compiling with Fink
Fink is an easy way to install libraries and programs on Mac OS X. To use the programs or libraries after installation, “source /sw/bin/init.csh” and (for libraries):
sident
Reading news from off-campus requires that you install PC-Leland and forward port 113 through your firewall to your PC. Port 113 is normally used by the ident service, but Stanford has used the port for a completely proprietary service called sident.
xauth
To set your DISPLAY to another X terminal, first get your magic cookie from the terminal.
  • xauth list $DISPLAY
Then, on the other computer
  • setenv DISPLAY whatever
  • xauth
  • add whatever . junkfromfirstline
Black and White Key Generator
Peter Molyneux’s game “Black and White” requires a key for installation and checks for the CD when it runs. Not very convenient if your laptop doesn’t have a CD-ROM drive!
Using CVS under Windows
Download these files to a location in your path.
Set the following environment variables:
  • HOME=C:\winnt
  • CVSROOT=:ext:lindholm@swig.stanford.edu:/opt/CVS
  • CVS_RSH=ssh
HOME is where you put the files. CVSROOT ext means invoke the program in CVS_RSH to perform updates. Next is your username on the CVS server, and finally, the path of the CVS root directory on the CVS server.
Use the -kb option with the “add” command on binary files to prevent binary/text conversion.
Cyrillic Characters under Unix
Setting up Unix and Pine to use characters from another character set is non-trivial. This web page explains how to set up Unix and Pine to use Cyrillic. One thing to note is that you don’t want to permanently set the character set in Pine to the new character set, because any message with eight-bit characters or an attachment with eight-bit characters will be flagged as being in that character set. A corollary is that if you are using a character set with only seven-bit characters, like JIS (ISO-2022-JP), you need to put at least one eight bit character in the message so that Pine will mark the message as using the other character set. An easy place to put it is in the signature.
Usenet
Best combo: XNews + GigaNews. XNews is written in Delphi to the raw Win32 API, so it looks unlikely to be ported to Mac or Linux anytime soon. XNews doesn’t support fetching missing pieces automatically, which is more important with cheaper news services. XNews on Win95 without Internet Explorer requires an updated comctl32.dll. GigaNews is about a dollar a gigabyte. Ultrafeed is a flat rate per month but less reliable.