The "plan" program The C file should have come with this information file. You don't need any special compiler flags, just type something like cc -O -o plan plan.c I've attempted to make this program portable (though restricted to Unix, obviously) and handle errors gracefully, so I hope you don't have any problems with it. To use the program, you must have the environment variable HOME set to your home directory, which will be where the .plan file is created. The program also accesses two other files in the home directory: .plans and .logins (not to be confused with .plan and .login, of course). If you currently have a .plan file, you should move that to .plans so that the program can use it to construct your .plan. If you wish the program to select randomly from a number of different plans, then write them all in your .plans file, separating them by a line looking like the following: ---8<--- Do not put that line at the beginning or end of .plans, but just between the different sections (you can change how the separator line looks by altering the definition of DELIMITER, but make sure that '\n' appears at each end of the string). There is another definition in the code, that is, MAXPLAN, which I have defined as 20. This is the maximum number of different plans you can have in the .plans file. Once you have done that, running the program (which I have called "plan") will select an entry from your .plans file and put it into your .plan file. If you want the program to keep a record of the host names where you are logged in, then you must run "plan login" at each login (for instance, I have this in my .login file) and "plan logout" at each logout (similarly, that is in my .logout file). Doing this causes the file .logins to be created, containing a list of all the host names where you have logged in and not logged out (it is OK to have repetitions), and the line: Currently logged in at: [list of names] is added to the .plan file. If you are logged in nowhere, then this line is absent, and the .logins file is removed, so that the existence of .logins is an indicator of whether you are logged in anywhere. For remote X windows, I also have a csh alias similar to the following: alias rx 'rcmd \!* "plan -login;xterm;plan -logout"' (the minus sign before -login and -logout is optional). About the code: sorry it is a little obfuscated in places, and I didn't use many comments. Well, I didn't have to show it to an employer... I have added one or two comments to give the general idea. Ian.Collier@prg.ox.ac.uk